from string import *
from random import *

n, a, b, c = map(int, open('pwgen.in').read().split())
ch = lambda list, n: ''.join(choice(list) for _ in range(n))
s = ch(ascii_uppercase, a) + ch(ascii_lowercase, b) + ch(digits, n - a - b)
print(s, file=open('pwgen.out', 'w'))
