r=strsplit for(s in r(r(scan("stdin",""),";")[[1]],":"))write(chartr("0-9",paste(s[1],"-}"),s[2]),1)