class Program
	{
		public static void Main(string[] args)
		{
			string a,b;
			int BrojA, BrojB,i;
			
			a=Console.ReadLine();
			b=Console.ReadLine();
			
			BrojA=int.Parse(Console.ReadLine());
			BrojB=int.Parse(Console.ReadLine());
			
			if(BrojA==BrojB)
			{
				for(i=1;i<=BrojA;i++)
				{
					Console.Write(""+a+b);
				}
			}
			
			else
			{
				Console.WriteLine("Nemoguce");
			} 
			
			Console.WriteLine("");
			
			
			Console.Write("Press any key to continue . . . ");
			Console.ReadKey(true);
			
			
		}