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 NN denoting the number of artists. The next NN 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 MM denoting the number of albums. The next MM 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 KK denoting the number of tracks. The next KK 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