# include using namespace std; typedef long long ll; const int N = 20; ll n, x, y, z; ll a[N]; bool f(ll S) { for (int i = 0; i < n; i++) { for (int j = i + 1; j < n; j++) { for (int k = j + 1; k < n; k++) { if (~S & (1 << i) && ~S & (1 << j) && ~S & (1 << k)) { if ((a[i] > a[j] && a[j] < a[k] && a[i] != a[k]) || (a[i] < a[j] && a[j] > a[k] && a[i] != a[k])) { if (!f(S ^ (1 << i) ^ (1 << j) ^ (1 << k))) { x = i, y = j, z = k; return true; } } } } } } return false; } int main() { scanf("%lld", &n); for (int i = 0; i < n; i++) scanf("%lld", &a[i]); if (f(0)) printf("%lld %lld %lld\n", x, y, z); else printf("-1\n"); return 0; }