I need to implement the method 

`void filter(Reader mails, Reader groups, Writer users) throws IOException`

in such a way that it would combine two pieces of data frow readers into one writer.

The file for `mails` would look like this:

```
Login;Email
login1;mail1@mail.com
login2;mail2@mail.com
login3;mail3@mail.com
login4;mail4@mail.com

```

and the file for `groups` would look like this:

```
Login;Group;
login1;Group1
login2;Group2
login3;Group3
login4;Group2

```

And the result of merging should look like this:

```
Login;Email;Group
login1;mail1@mail.com;Group1
login2;mail2@mail.com;Group2
login3;mail3@mail.com;Group3
login4;mail4@mail.com;Group2

```

So, what I came up with is: get a string from the first reader, then get another string from the second reader, manipulate them as needed and then write the result with writer.

But is there a way to make it differently or just more elegant? 

PS: I'm obliged to use only `Reader` and `Writer` classes.

BTW: when I write something to a file with Writer and if I look into the file, I'll see something unreadable. But if I read the same file with Reader and then print it on the console, it looks ok. Is it normal? Or how can I write to the file to make it readable?