• + 0 comments

    Scanner sc = new Scanner(System.in); int p = sc.nextInt(); List> lisOfLis = new ArrayList<>(); for(int i=0;i list1 = new ArrayList<>();
    for(int j=0;j= 0 && x < p && y >= 0 && y < lisOfLis.get(x).size()){ List newlist = lisOfLis.get(x); System.out.println(newlist.get(y)); }else{ System.out.println("ERROR!"); }
    }
    sc.close();