import java.util.Scanner;
public class Main {
public static void main
(String[] args
) { Scanner scanner
= new Scanner
(System.
in);
int n, m;
n = scanner.nextInt();
m = scanner.nextInt();
int[][] b = new int[10000][10000];
for (int i = 1; i <= m; i++) {
// Taking input for an undirected graph.
int x, y;
x = scanner.nextInt();
y = scanner.nextInt();
b[x][y] = 1;
b[y][x] = 1;
}
for (int i = 0; i < n; i++) {
int c = 0;
for (int j = 0; j < n; j++) {
if (b[i][j] == 1) {
c++;
}
}
System.
out.
println(i
+ " " + c
); }
}
}
aW1wb3J0IGphdmEudXRpbC5TY2FubmVyOwogCnB1YmxpYyBjbGFzcyBNYWluIHsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHsKICAgICAgICBTY2FubmVyIHNjYW5uZXIgPSBuZXcgU2Nhbm5lcihTeXN0ZW0uaW4pOwogCiAgICAgICAgaW50IG4sIG07CiAgICAgICAgbiA9IHNjYW5uZXIubmV4dEludCgpOwogICAgICAgIG0gPSBzY2FubmVyLm5leHRJbnQoKTsKIAogICAgICAgIGludFtdW10gYiA9IG5ldyBpbnRbMTAwMDBdWzEwMDAwXTsKIAogICAgICAgIGZvciAoaW50IGkgPSAxOyBpIDw9IG07IGkrKykgewogICAgICAgICAgICAvLyBUYWtpbmcgaW5wdXQgZm9yIGFuIHVuZGlyZWN0ZWQgZ3JhcGguCiAgICAgICAgICAgIGludCB4LCB5OwogICAgICAgICAgICB4ID0gc2Nhbm5lci5uZXh0SW50KCk7CiAgICAgICAgICAgIHkgPSBzY2FubmVyLm5leHRJbnQoKTsKICAgICAgICAgICAgYlt4XVt5XSA9IDE7CiAgICAgICAgICAgIGJbeV1beF0gPSAxOwogICAgICAgIH0KIAogICAgICAgIGZvciAoaW50IGkgPSAwOyBpIDwgbjsgaSsrKSB7CiAgICAgICAgICAgIGludCBjID0gMDsKICAgICAgICAgICAgZm9yIChpbnQgaiA9IDA7IGogPCBuOyBqKyspIHsKICAgICAgICAgICAgICAgIGlmIChiW2ldW2pdID09IDEpIHsKICAgICAgICAgICAgICAgICAgICBjKys7CiAgICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgU3lzdGVtLm91dC5wcmludGxuKGkgKyAiICIgKyBjKTsKICAgICAgICB9CiAgICB9Cn0=