#include #include #include #include #include #include #include #define mp make_pair #define pb push_back #define xx first #define yy second using namespace std; int a[100]; vector > b; int main() { int T, n, m; scanf("%d", &T); while(T--) { scanf("%d", &n); for(int i=1;i<=n;i++) scanf("%d", &a[i]); int cnt = 0; b.clear(); while(true) { for(int i=2;i<=n;i++) { for(int j=1;j1;j--) a[j] = a[j-1]; a[1] = x; // for(int i=1;i<=n;i++) cout << a[i] << " "; // cout << endl; b.clear(); } cout <