I am trying to read a file. The file in question has two strings, one on its own line, like this:

COMETQ  

HVNGAT

I am trying to assign each string to its own String variable. However, when I run my code (below), I get a NoSuchElementException for the second .nextToken().

```
    BufferedReader f = new BufferedReader(new FileReader("ride.in"));
    PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter("ride.out")));

    StringTokenizer st = new StringTokenizer(f.readLine());

    String comet = st.nextToken();
    String group = st.nextToken();

```

Can someone help me figure out what's wrong? Thank you!

Note: this is a USACO training page problem. I am just trying to seek help to debug the file reading, not solve the problem.