#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char** argv) {
	int a,b,n[100],y[100];
	cin >> a >> b;
	for(int i = 0; i<a; i++)
	{
		cin >> n[i];
	}
	for(int i = 0; i<b; i++)
	{
		cin >> y[i];
	}
	for(int i = 0; i<b; i++)
	{
		cout << 0 << endl;
	}

	
	return 0;
}