Snuke got an integer sequence from his mother, as a birthday present. The sequence has N elements, and the i-th of them is i. Snuke performs the following Q operations on this sequence. The i-th operation, described by a parameter q_i, is as follows:

* Take the first q_i elements from the sequence obtained by concatenating infinitely many copy of the current sequence, then replace the current sequence with those q_i elements.



After these Q operations, find how many times each of the integers 1 through N appears in the final sequence.

Constraints

* 1 ≦ N ≦ 10^5
* 0 ≦ Q ≦ 10^5
* 1 ≦ q_i ≦ 10^{18}
* All input values are integers.

Input

The input is given from Standard Input in the following format:


N Q
q_1
:
q_Q


Output

Print N lines. The i-th line (1 ≦ i ≦ N) should contain the number of times integer i appears in the final sequence after the Q operations.

Examples

Input

5 3
6
4
11


Output

3
3
3
2
0


Input

10 10
9
13
18
8
10
10
9
19
22
27


Output

7
4
4
3
3
2
2
2
0
0
// from alphaGem
//cheat?
#include<algorithm>
#include<iostream>
#include<cstring>
#include<cstdio>
#include<queue>
using namespace std;
long long a[444444];
struct p{long long x,c;inline bool operator<(const p b)const{return x<b.x;}};
priority_queue<p>q;
long long op[444444];
int cp;
long long res[444444];
int main()
{
	int n,m;
	scanf("%d%d",&n,&m);
	for(int i=1;i<=m;i++)scanf("%lld",&a[i]);
	long long mi=2333333333333333333ll;
	for(int i=m;i;i--)if(a[i]<mi)mi=op[++cp]=a[i];
	if(n<mi)mi=op[++cp]=n;
	q.push((p){op[1],1});
	for(int i=2;i<=cp;i++)
	{
		long long cnow=0;
		for(;q.top().x>op[i];q.pop())
		{
			cnow+=q.top().x/op[i]*q.top().c;
			q.push((p){q.top().x%op[i],q.top().c});
		}
		q.push((p){op[i],cnow});
	}
	for(;!q.empty();q.pop())res[q.top().x]+=q.top().c;
	for(int i=n;i;i--)res[i-1]+=res[i];
	for(int i=1;i<=n;i++)printf("%lld\n",res[i]);
	return 0;
}