import java.util.Scanner;

public class LineFilterer {

    private final Scanner scanner = new Scanner(System.in);

    public void start(){
        while(true){
            String in = scanner.nextLine();

            String regex = "^(?=.*-p\\s+\\S+)(?=.*-i\\s+\\S+)(?=.*-o\\s+\\S+).*$";

            if(in.matches(regex)){
                String[] args = in.split(" ");
                String input = null;
                String output = null;
                String pattern = "";
                for (int i = 0; i < args.length; i++) {
                    if ((i+1 < args.length) && args[i].equals("-i")) {
                        i++;
                        input = args[i];
                    } else if ((i+1 < args.length) && args[i].equals("-o")) {
                        i++;
                        output = args[i];
                    } else if ((i+1 < args.length) && args[i].equals("-p")) {
                        i++;
                        pattern = args[i];
                    }
                }
                System.out.println(in);
            }
        }
    }
}
