• + 0 comments

    //Complete this code or write your own from scratch import java.util.; import java.io.;

    class Solutions{ public static void main(String []argh) {

        Map <String,Integer> hashMapPhoneRecord
                               = new HashMap<>();
        Scanner in = new Scanner(System.in);
        //System.out.println("Enter nth value");
        int n=in.nextInt();
        in.nextLine();
        for(int i=0;i<n;i++)
        {
            String name=in.nextLine();
            int phone=in.nextInt();
            hashMapPhoneRecord.put(name, phone);
            in.nextLine();
        }
        while(in.hasNext())
        {
            String s=in.nextLine();
            if(hashMapPhoneRecord.containsKey(s))
               System.out.println(s + "=" + hashMapPhoneRecord.get(s));
    
             else
                System.out.println("Not Found");
    
        }
        in.close();
    
    
    }
    

    }