unittest
{
	assert( [ "4 3", "1 2", "2 3", "1 4" ].parse.expand.solve == "2\n2\n1\n1" );
	assert( [ "2 5", "1 2", "2 1", "1 2", "2 1", "1 2" ].parse.expand.solve == "5\n5" );
	assert( [ "8 8", "1 2", "3 4", "1 5", "2 8", "3 7", "5 2", "4 1", "6 8" ].parse.expand.solve == "3\n3\n2\n2\n2\n1\n1\n2" );
}



import std.algorithm;
import std.conv;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto nm = input.front.split.to!( long[] );
	auto abs = new long[ 2 ][ nm[ 1 ] ];
	foreach( ref ab; abs )
	{
		input.popFront;
		ab = input.front.split.to!( long[] );
	}
	return tuple( nm[ 0 ], abs );
}

auto solve( long n, long[ 2 ][] abs )
{
	auto ss = new long[ n ];
	foreach( ab; abs )
	{
		ss[ ab[ 0 ] - 1 ]++;
		ss[ ab[ 1 ] - 1 ]++;
	}
	return ss.to!( string[] ).join( "\n" );
}
