#include <bits/stdc++.h>   using namespace std;   const int N = 25;   long long n, ans[N];   pair<int, int> arr[N];   int main() {     ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);     cin >> n;     for (int i = 0; i < n; i++) cin >> arr[i].first, arr[i].second = i;     sort(arr, arr + n);     for (int i = 0; i < n; i++) ans[arr[(i + 1) % n].second] = arr[i].first;     for (int i = 0; i < n; i++) cout << ans[i] <<    ;     return 0;   }   