import java.util.*;
class animal{
void cry(){
}
void get_animal_name(){
}
}
class dog extends animal{
String s1,s2;
dog(String s1,String s2){
this.s1=s1;
this.s2=s2;
}
void cry(){
System.out.println(s2);
}
void get_animal_name(){
System.out.print(s1+":");
}
}
class cat extends animal{
String s1,s2;
cat(String s1,String s2){
this.s1=s1;
this.s2=s2;
}
void cry(){
System.out.println(s2);
}
void get_animal_name(){
System.out.print(s1+":");
}
}
public class Main {
public static void main(String args[]){
Scanner cin=new Scanner(System.in);
while(cin.hasNext()){
animal ani1,ani2;
int a[]=new int [3];
for(int i=1;i<=2;i++){
int t=cin.nextInt();
a[i]=t;
String str=cin.nextLine();
if(t==1){
ani1=new dog(str,"Wang,Wang…");
}
else if(t==0){
ani2=new cat(str,"Miao,Miao…");
}
}
for(int i=1;i<=2;i++){
if(a[i]==1){
ani1.get_animal_name();
ani1.cry();
}
else if(a[i]==0){
ani2.get_animal_name();
ani2.cry();
}
}
}
}
}