Artist Catalog

There are a number of artists that have recorded albums with tracks.
Print the catalog of artists on the appropriate format.

Input

The input starts with an integer N denoting the number of artists. The
next N lines contain the description of each artist on the format
“<artist name>-<isGroup>”, where <artist name> is the name of the artist
and <isGroup> equals “Y” if the artist is a group, and “N” otherwise.

The next line contains an integer M denoting the number of albums. The
next M lines contain the description of each album on the format
“<artist name>-<album name>-<isListed>”, where <artist name> is the name
of the artist recording the album, <album name> is the name of the
album, and <isListed> equals “Y” if the album is listed, and “N”
otherwise.

The next line contains an integer K denoting the number of tracks. The
next K lines contain the description of each track on the format
“<artist name>-<album name>-<track name>-<master file>-<duration>”.
Here, <master file> is the name of the sound file containing the track,
and <duration> is its duration in seconds.

Output

For each artist in the order they appear in the input, print its
information on the format specified in the example.

Problem information

Author: Anders Jonsson

Generation: 2026-01-25T14:59:10.957Z

© Jutge.org, 2006–2026.
https://jutge.org
