Subscriptions

There are a number of artists that have recorded albums with tracks. Moreover, there are a number of users subscribed to artists. Print the catalog of artists on the appropriate format, including the subscribed users of each artist.

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.

The next line contains an integer PP denoting the number of users. The next PP lines contain the description of each user on the format “<<user name>>-<<user email>>.

The next line containt an integer QQ denoting the number of subscriptions. The next QQ lines contain the description of each subscription on the format “<<user name>>-<<artist name>>.

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-25T15:25:40.388Z

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