#### PROB8: SPAM

Be hated by the free world.

#### DESCRIPTION

You never had any friends, and don't really want any anyways, and so you have decided to collect email addresses from web pages for direct e-mail advertising.

The text delivered to a web browser is usually marked up HTML, which may contain email addresses of the form:

user@server

• Both user and server are of the form alpha.numeric.with.dots. By alpha.numeric.with.dots, we mean a sequence of one or more characters which are alphabetic (A-Z,a-z), numeric (0-9), hyphens (-), underbars (_) and/or periods (.), with the following restrictions on periods:
• The sequence neither starts nor ends with a period.
• Email addresses are preceded by the beginning of the file, or some character other than a letter (A-Z,a-z), digit (0-9), hyphen (-), or underbar (_).
• Email addresses are succeeded by the end of the file, or some character other than a letter (A-Z,a-z), digit (0-9), hyphen (-), or underbar (_).
• If the scanned text contains a sequence of the form

first@second@third

Then the output should contain first@second and second@third as email addresses. In a longer run, each pair split by an @-sign should appear as an email address in the output.

The point of this problem is to extract and record the email addresses embedded in other text.

#### INPUT: prob8.dat

The input file will contain zero or more lines of ASCII text, for example:

```
column   111111111122222222223333333333444444444455555555556
123456789012345678901234567890123456789012345678901234567890
line 1:bob@banks.com wrote:[EOL]
2:>> What does <tt>x=7</tt> mean for this problem?  For[EOL]
3:>> example,[EOL]
4:>>[EOL]
5:>>   ..a@a@aa@aaa@aaa..a@a@aa@aaa@aaa..a@a..@a...a@..@..[EOL]
6:>>[EOL]
7:>> this scrolling @-example from jim@jones.com.[EOL]
8:>>[EOL]
9:>> <a href="mailto:Bobby@mail.bobsbanks.com">Bob</a>[EOL]
:[EOF]

```

#### OUTPUT: prob8.out

Other than the leader and trailer messages, the output file has each email address found in the input file in the order it was found (duplicates not removed).

The correct output corresponding to the example input file would be:

```
column   111111111122222222223
123456789012345678901234567890
line 1:Start of Spam Program[EOL]
2:bob@banks.com[EOL]
3:a@a[EOL]
4:a@aa[EOL]
5:aa@aaa[EOL]
6:aaa@aaa[EOL]
7:a@a[EOL]
8:a@aa[EOL]
9:aa@aaa[EOL]
10:aaa@aaa[EOL]
11:a@a[EOL]
12:jim@jones.com[EOL]
13:Bobby@mail.bobsbanks.com[EOL]
14:End of Spam Program[EOL]
:[EOF]

```