import java.util.*; import java.math.*; public class Main { public static void main(String[] args) { Scanner scan = new Scanner(System.in); String textA = scan.nextLine(); String textB = scan.nextLine(); if(Objects.equals(textA,textB)){ System.out.println("1 2 3 4 5"); }else{ if(Objects.equals(textA,"1 2 3 4 5")){ System.out.println(textB); }else{ System.out.println(textA); } } } }