there website accessible different address for example long time codeforce accessible hostname codeforcescom codeforcesruYou give list page address query for simplicity consider address form httphostnamepath hostname server consist word maybe dot separate path optional path consist word separate slash we consider hostname correspond website query hostname exactly query second vice versa query second hostname query take look sample clarificationsyour goal determine group server name correspond website Ignore group consist server nameplease note accord definition query httphostname httphostname different