// Arup Guha
// 4/2/2015
// Solution to 2015 NAIPC Problem I: Zamboni

import java.util.*;
import java.io.*;

public class zamboni {

	// Direction of movement. DX[i],D[i] is direction we move on step x where x%4 == i.
	final public static int[] DX = {-1,0,1,0};
	final public static int[] DY = {0,1,0,-1};

	// Easier to make these accessible.
	public static int r;
	public static int c;
	public static int x;
	public static int y;
	public static char[][] grid;

	public static void main(String[] args) {

		// Read input.
		Scanner stdin = new Scanner(System.in);
		r = stdin.nextInt();
		c = stdin.nextInt();
		x = stdin.nextInt()-1;
		y = stdin.nextInt()-1;
		long steps = stdin.nextLong();

		// Initialize grid.
		grid = new char[r][c];
		for (int i=0; i<r; i++)
			Arrays.fill(grid[i], '.');

		// Determine the first iteration in the for loop simulation that might matter.
		long start = Math.max(0, steps - 4*Math.max(r,c));

		// Simulate each step.
		for (long i=start; i<steps; i=i+1)
			sim(i);

		// Add the ending location of our zamboni.
		int[] end = getStart(steps);
		grid[end[0]][end[1]] = '@';

		// Annoying, build answer in one char array.
		char[] res = new char[r*(c+1)];
		for (int i=0; i<r; i++) {
			for (int j=0; j<c; j++)
				res[i*(c+1)+j] = grid[i][j];
			res[i*(c+1)+c] = '\n';
		}

		// Output.
		System.out.println(new String(res));
	}

	// Returns where #step starts.
	public static int[] getStart(long step) {

		int[] res = new int[2];

		// Set row coordinate.
		long tmp = (step+1)/2;
		if (tmp%2 == 1) tmp = -tmp;
		res[0] = (int)((r+tmp)%r);

		// Set column coordinate.
		if (step%4 < 2) res[1] = (int)((c-(step/2)%c)%c);
		else			res[1] = (int)(((step+2)/2)%c);

		// Offset
		res[0] = (res[0]+x+r)%r;
		res[1] = (res[1]+y+c)%c;

		return res;
	}

	// Simulates iteration index, zero-based.
	public static void sim(long index) {

		int[] start = getStart(index);
		char letter = (char)('A' + ((int)(index%26)));

		// Long steps are the easiest!
		if (index > Math.max(r,c)) {
			if (index%2 == 0) 	fillCol(start[1], letter);
			else				fillRow(start[0], letter);
		}

		// We can just sim it here...
		else {

			int[] cur = {start[0], start[1]};
			for (int i=0; i<index+1; i++) {
				grid[cur[0]][cur[1]] = letter;
				cur[0] += DX[(int)(index%4)];
				cur[1] += DY[(int)(index%4)];
				map(cur);
			}
		}
	}

	// Avoid array out of bounds...
	public static void map(int[] pt) {
		pt[0] = (r+pt[0])%r;
		pt[1] = (c+pt[1])%c;
	}

	// Just do it.
	public static void fillCol(int col, char let) {
		for (int i=0; i<r; i++)
			grid[i][col] = let;
	}

	// Same here...
	public static void fillRow(int row, char let) {
		Arrays.fill(grid[row], let);
	}
}