// compile in C++11. use -std=c++11.
#include <iostream>
#include <iomanip>
#include <vector>
#include <map>
#include <set>
#include <list>
#include <queue>
#include <stack>
#include <bitset>
#include <utility>
#include <numeric>
#include <algorithm>
#include <functional>
#include <complex>
#include <string>
#include <sstream>

#include <cstdio>
#include <cstdlib>
#include <cctype>
#include <cstring>

// this require C++11
#include <unordered_set>
#include <unordered_map>

using namespace std;

#define all(c) c.begin(),c.end()
#define repeat(i,n) for(int i=0;i<(int)n;i++)
#define debug(x) #x << "=" << (x)

typedef long long ll;
typedef vector<int> vi;

template<typename T>
ostream& operator<<(ostream& os,const vector<T>& val){
    os << "[ ";
    for(typename vector<T>::const_iterator it=val.begin();
        it != val.end();++it){
        os << *it << " ";
    }
    os << "]";
    return os;
}

template<typename T,typename IT>
struct Indexer{
    struct iterator{
        typedef IT inner_iterator;
        typedef typename iterator_traits<inner_iterator>::reference inner_reference;
        struct reference : pair<size_t,inner_reference>{
            reference(size_t s,inner_reference i) :
                pair<size_t,inner_reference>(s,i) {}
            const size_t& index = (*this).first;
            const inner_reference& value = (*this).second;
        };

        iterator(inner_iterator i) : pos(0),it(i) {}
        reference operator*() const {
            return reference(pos,*it);
        }
        iterator& operator++(){
            ++pos;++it;
            return *this;
        }
        iterator operator++(int){
            iterator tmp(*this);
            ++(*this);
            return tmp;
        }
        bool operator==(const iterator& rhs) const{
            return it == rhs.it;
        }
        bool operator!=(const iterator& rhs) const{
            return !(*this == rhs);
        }
    private:
        size_t pos;
        inner_iterator it;
    };

    Indexer(T& t): container(t) {};
    iterator begin() const{
        return iterator(container.begin());
    }
    iterator end() const{
        return iterator(container.end());
    }

private:
    T& container;
};

template<typename T>
Indexer<T,typename T::iterator> enumerate(T& t){
    return Indexer<T,typename T::iterator>(t);
}
// value will be readonly.
template<typename T>
Indexer<T,typename T::const_iterator> const_enumerate(T& t){
    return Indexer<T,typename T::const_iterator>(t);
}

template<typename T>
T input(){
    T tmp;
    cin >> tmp;
    return tmp;
}

int main(){

    return 0;
}