//
//  main.cpp
//  Rokada
//
//  Created by Filip Gojkovic on 1/26/19.
//  Copyright © 2019 Filip Gojkovic. All rights reserved.
//

#include <iostream>
#include <vector>

using namespace std;

int main(int argc, const char * argv[]) {
    int a,b;
    cin >> a >> b;
    string ulaz;
    vector<string> vec;
    for(int i = 0; i < b; ++i){
        cin >>ulaz;
        vec.push_back(ulaz);
    }
    cout << -1;
    return 0;
}