#include <algorithm>
#include <iostream>
#include <string>
#include <iterator>
#include <vector>
std::vector<int> Putting;
class Bacteria{
private:
int timeOf;
int Grow;
inline static int counter;
const int id;
public:
Bacteria(int a, int b): timeOf(a), Grow(a + b), id(++counter){
std::cout << id << '\n';
}
static int Print(){
return counter;
}
};
std::vector<Bacteria> BacS;
int main(){
int am, all = 0;
std::cin >> am >> all;
for(int i = 0; i != am; ++i){
int a = 0;
std::cin >> a;
Putting.push_back(a);
}
auto iter = Putting.begin();
for(int i = 0; i != am; ++i){
int a = 0;
std::cin >> a;
Bacteria b = Bacteria(*iter, a);
BacS.push_back(b);
++iter;
std::cout << Bacteria::Print;
}
std::cout << Bacteria::Print;
}