// Arup Guha
// 7/15/2026
// Solution to UCF 1995 HS Contest Problem: Obedience School

import java.util.*;

public class obey {

	public static void main(String[] args) {

		Scanner stdin = new Scanner(System.in);
		
		// All dogs are close.
		HashMap<String,Boolean> state = new HashMap<String,Boolean>();
		state.put("Argus", true);
		state.put("Cerberus", true);
		state.put("Gromit", true);
		state.put("Ren", true);
		
		// Process, line by line - Java makes this easy.
		while (stdin.hasNext()) {
		
			// a = good, c doesn't come, g doesn't speak, r doesn't sic.
			String dog1 = stdin.next();
			String cmd = stdin.next();
			
			// sic.
			if (cmd.equals("sic")) {
			
				// Dog to attack.
				String dog2 = stdin.next();
				
				// Ren doesn't do this command.
				if (dog1.equals("Ren")) continue;
				
				// These dogs are far away.
				state.put(dog1, false);
				state.put(dog2, false);
			}
			
			// speak
			else if (cmd.equals("speak")) {
			
				// Ren doesn't speak otherwise the dog does if they're close.
				if (!dog1.equals("Gromit") && state.get(dog1))
					System.out.println("Bark!");
				else
					System.out.println("No response.");
			}
			
			// come
			else {
			
				// They all come except Cerberus.
				if (!dog1.equals("Cerberus"))
					state.put(dog1, true);
			}
		}
	}
}