import java.util.*; import java.io.*; import java.math.*; import java.util.stream.Stream; public class Main{ static PrintWriter output; static Scanner sc; static int cnt ; static void solve() { int n = sc.nextInt(); int [] cup = new int[n]; for(int i=0;i