import java.io.*; import java.util.*; public class Main { static HashMap hashMap; static int n,m,h; public static void main(String[] args) throws Exception { BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); StringTokenizer st = new StringTokenizer(br.readLine()," "); n = Integer.parseInt(st.nextToken()); m = Integer.parseInt(st.nextToken()); hashMap = new HashMap(); for ..