#include<stdio.h>
#include<string.h>
int main()
{
char a[1001], n;
char b[10][100] ={"bowl", "knife", "fork", "chopsticks"};
while (scanf("%d",&n) != EOF)
{
int i, j;
for (i = 0; i < n; i++)
{
scanf("%s",a);
for (j = 0; j < 4; j++)
{
if (strcmp(a, b[j]) == 0)
printf("%s ",a);
}
}
printf("\n");
}
return 0;
}