// editor5
#include<stdio.h>
#include<string.h>

int main() {
    int n;
    scanf("%d", &n);
    char fruits[20];
    char search_fruit[20];
    
    for (int i = 0; i < n; i++) {
        scanf("%s", fruits[i]);
    }
    
    scanf("%s", search_fruit);
    
    int found = 0;
    for (int i = 0; i < n; i++) {
        if (strcmp(fruits[i], search_fruit) == 0) {
            found = 1;
            break;
        }
    }
    
    if (found) {
        for (int i = 0; i < n; i++) {
            printf("%s ", fruits[i]);
        }
        printf("\n")
    } else {
        printf("Fruit not found!\n");
    }
    
    return 0;
}