Problem:
Score : 100 points

Problem Statement

Rng is going to a festival.

The name of the festival is given to you as a string S, which ends with FESTIVAL, from input. Answer the question: "Rng is going to a festival of what?" Output the answer.

Here, assume that the name of "a festival of s" is a string obtained by appending FESTIVAL to the end of s.
For example, CODEFESTIVAL is a festival of CODE.

Constraints

9 \leq |S| \leq 50

S consists of uppercase English letters.

S ends with FESTIVAL.

Input

Input is given from Standard Input in the following format:

S

Output

Print the answer to the question: "Rng is going to a festival of what?"

Sample Input 1

CODEFESTIVAL

Sample Output 1

CODE

This is the same as the example in the statement.

Sample Input 2

CODEFESTIVALFESTIVAL

Sample Output 2

CODEFESTIVAL

This string is obtained by appending FESTIVAL to the end of CODEFESTIVAL, so it is a festival of CODEFESTIVAL.

Sample Input 3

YAKINIKUFESTIVAL

Sample Output 3

YAKINIKU

Solution in Java8 (OpenJDK 1.8.0) (judge verdict: Runtime Error)

import java.util.ArrayList;
import java.util.Scanner;

public class Main {

    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);

        int a = scanner.nextInt();
        ArrayList<Integer> aList = new ArrayList<>();
        for (int i = 0; i < a; i++) {
            aList.add(scanner.nextInt());
        }

        int b = scanner.nextInt();
        ArrayList<Integer> bList = new ArrayList<>();
        for (int i = 0; i < b; i++) {
            bList.add(scanner.nextInt());
        }

        if (a < b) {
            System.out.println("NO");
            return;
        }

        for (int s : bList) {
            int index = aList.indexOf(s);

//            System.out.println(s);
            if (index == -1) {
                System.out.println("NO");
                return;
            }

            aList.remove(index);
        }

        System.out.println("YES");
    }

}