namespace MusicApp;

using System;
using System.IO;

public class Program
{


    public static void Main(string[] args)
    {
        const string path = @"C:\Users\Gabci\Desktop\SznikakHF_1\hazi1-2026-afghangoat\Task1\Input\music.txt";

        List<Song> songs = new List<Song>();

        string[] songLines = File.ReadAllLines(
            path
        ); //Nem kell close-olni, mert nem stream. Sokkal kényelmesebb, legalább is nekem.

        for (int i = 0; i < songLines.Length; i++)
        {
            string line = songLines[i];
            if (string.IsNullOrWhiteSpace(line))
                continue;

            string[] lineItems = line.Split(';');

            string artist = lineItems[0].Trim();

            for (int j = 1; j < lineItems.Length; j++)
            {
                Song song = new Song(artist, lineItems[i].Trim());
                songs.Add(song);
            }
        }

        foreach (Song song in songs) {
            Console.WriteLine(song.ToString());
        }
    }
}
