Php Foreach Key Value Multidimensional Array Codeforces