#include <stdio.h>
#include <string.h>
#define MAX_FRUIT_NAME_LENGTH 20
#define MAX_N 100

int main() {
    int n;
    char *fruits[MAX_N];
    char targetFruit[MAX_FRUIT_NAME_LENGTH];

    // Read the number of fruits
    scanf("%d", &n);
    getchar(); // Consume newline

    // Allocate and read the names of fruits
    for (int i = 0; i < n; i++) {
        fruits[i] = malloc(MAX_FRUIT_NAME_LENGTH * sizeof(char));
        fgets(fruits[i], MAX_FRUIT_NAME_LENGTH, stdin);
        fruits[i][strcspn(fruits[i], "\n")] = 0; // Remove trailing newline
    }

    // Read the target fruit
    fgets(targetFruit, MAX_FRUIT_NAME_LENGTH, stdin);
    targetFruit[strcspn(targetFruit, "\n")] = 0;

    // Check if the target fruit is in the list
    int found = 0;
    for (int i = 0; i < n; i++) {
        if (strcmp(fruits[i], targetFruit) == 0) {
            found = 1;
            break;
        }
    }

    if (found) {
        // Print all fruits if target fruit is found
        for (int i = 0; i < n; i++) {
            printf("%s", fruits[i]);
            if (i < n - 1) {
                printf(" ");
            }
        }
        printf("\n");
    } else {
        printf("Fruit not found!\n");
    }

    // Free allocated memory
    for (int i = 0; i < n; i++) {
        free(fruits[i]);
    }

    return 0;
}