#include<bits/stdc++.h>
using namespace std;

#define int long long

#define mp make_pair
#define pb push_back
#define st first
#define nd second
#define pp pair< int , int >
#define mod 1000000007
#define N 200005

int A[N];

signed main(){
    int n;
    cin >> n;
    for(int i=1; i<=n; i++) scanf("%d", &A[i]);
    

    vector < int > ans;
    for(int i=1; i<=n;){
        
        int j = i;
        for(; A[j] == j+1 ;) j++;
        
        if(j < n && A[j+1] != i){
            cout << -1;
            return 0;
        }

        for(int k=min(n-1, j); k>=i; k--)
            ans.pb(k);

        i = j + 1;
        A[i] = A[i-1];
    }

    for(int w: ans)
        printf("%d\n", w);
    return 0;
}

#include<bits/stdc++.h>
using namespace std;
#define ll long long int
#define ff(i,a,b) for( ll i=a;i<b;i++)
#define fb(i,a,b) for( ll i=a;i>=b;i--)
#define tc() int t; cin>> t; while (t--)
#define MOD 1000000007
#define vec vector<ll>
#define pb push_back
#define b begin()
#define e end()
int main()
{ios_base::sync_with_stdio(false);
    cin.tie(NULL);
ll n; cin>>n;
if(n%2)
{cout<<"Black";}
else
{
    cout<<"White";
}

return 0;}
//PRATIK_SINGH!!

// ░█████╗░░░░░░░░░░░░░░░
// ██╔══██╗░░██╗░░░░██╗░░
// ██║░░╚═╝██████╗██████╗
// ██║░░██╗╚═██╔═╝╚═██╔═╝
// ╚█████╔╝░░╚═╝░░░░╚═╝░░
// ░╚════╝░░░░░░░░░░░░░░░