while""do a,z,b=io.read("*n",1,"*n")c=a;d=b;while(d>0)do c,d=d,c%d;end print(b/c>1 and a/c..z..b/c or a/c)end