#include <stdio.h>
#include <string.h>
#include <ctype.h>

int stricmp (const char *a, const char *b)
{
    while (*a && *b) {
        if (tolower(*a) != tolower(*b))
            return tolower(*a) -
    tolower(*b);
        a++;
        b++;
    }
    return tolower(*a) - tolower(*b);
}

int main() {
    int n, found = 0;
    scanf("%d", &n);
    
    char Fruit[n][20];
    for (int i = 0; i < n; i++){
        scanf("%s", Fruit[i]);
    }
    
    char search[20];
    scanf("%s", search);
    
    for (int i = 0; i < n; i++)
        if (stricmp(Fruit[i], search) ==
        0) {
            found = 1;
            break;
        }    
    }
    if (found) {
        for (int i = 0; i < n; i++)
             printf("%s ", Fruit[i]);
    } else {
        printf("Fruit not found!");
    }    
        return 0;
}