#include <bits/stdc++.h>
using namespace std;

char c1; int a1;
char c2; int a2;

void print(int ostatak) {
	for (int i = 0; i < a1 + a2; i++) {
		if (i % 2 == ostatak) {
			cout << c1;
		}
		else {
			cout << c2;
		}
	}
}

int main(int argc, char const *argv[])
{
	cin >> c1 >> c2;
	cin >> a1 >> a2;
	if (a1 > a2) {
		if (a1 - a2 == 1)
			print(0);
		else
			cout << "nemoguce" << endl;
	}
	else if (a2 > a1) {
		if (a2 - a1 == 1)
			print(1);
		else
			cout << "nemoguce" << endl;
	}
	else {
		print(1);
	}
	return 0;
}