import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
		Scanner reader = new Scanner(System.in);
		int p1 = reader.nextInt();
		int p2 = reader.nextInt();
		int p3 = reader.nextInt();
		reader.nextLine();
		String s = reader.nextLine();

		StringBuilder res = new StringBuilder();
		int n = s.length();
		for (int i = 0; i < n; i++) {
			if (s.charAt(i) == '-') {
				if (i == 0 || i == n - 1) {
					res.append("-");
					continue;
				}

				char left = s.charAt(i - 1);
				char right = s.charAt(i + 1);

				boolean isLetter = (left >= 'a' && left <= 'z') && (right >= 'a' && right <= 'z');
				boolean isDigit = (left >= '0' && left <= '9') && (right >= '0' && right <= '9');

				if (!isLetter && !isDigit) {
					res.append("-");
					continue;
				}

				if (right <= left) {
					res.append("-");
					continue;
				}

				StringBuilder fill = new StringBuilder();
				for (char c = (char) (left + 1); c < right; c++) {
					char outputChar;
					if (p1 == 3) {
						outputChar = '*';
					} else if (isLetter) {
						if (p1 == 1) {
							outputChar = c;
						} else {
							outputChar = Character.toUpperCase(c);
						}
					} else {
						outputChar = c;
					}

					for (int j = 0; j < p2; j++) {
						fill.append(outputChar);
					}
				}
				if (p3 == 2) {
					fill.reverse();
				}
				res.append(fill);
			} else {
				res.append(s.charAt(i));
			}
		}
		System.out.println(res.toString());
		reader.close();
	}

}