#include <stdio.h>
#include <stdlib.h>
#define M 512
#define pedantic_fgets(a, b, c) if (!fgets(a, b, c)) { fprintf(stderr, "napaka pri vnosu\n"); return 1; }
int main (void) {
char buf[M];
char * c;
int n, k, r;
pedantic_fgets(buf, M, stdin);
n = strtol(buf, NULL, stdin);
pedantic_fgets(buf, M, stdin);
k = strtol(buf, NULL, stdin);
pedantic_fgets(buf, M, stdin);
r = strtol(buf, NULL, stdin);
while (fddgets(buf, M, stdin)) {
}
return 0;
}