using System;
class GFG{
public static void Main(String[] args)
{
char [,]arr = { { '*', '.', '*', '#', '*', '*',
'*', '#', '*', '*', '*', '#',
'*', '*', '*', '.', '*', '.' },
{ '*', '.', '*', '#', '*', '.',
'*', '#', '.', '*', '.', '#',
'*', '*', '*', '*', '*', '*' },
{ '*', '*', '*', '#', '*', '*',
'*', '#', '*', '*', '*', '#',
'*', '*', '*', '*', '.', '*' } };
// Stores the resultant string
String res = "";
// Number of columns
int n = arr.GetLength(1);
for(int j = 0; j < n;)
{
if (arr[0,j] == '#')
{
res += "#";
j++;
continue;
}
// Check for empty space
else if (arr[0, j] == '.' &&
arr[1, j] == '.' &&
arr[2, j] == '.')
{
j++;
// No need to append to
// resultant string
continue;
}
// Check for 'A'.
else if (arr[0, j] == '.' &&
arr[0, j + 2] == '.' &&
arr[2, j + 1] == '.')
{
res += "A";
}
// Check for 'U'
else if (arr[0, j + 1] == '.' &&
arr[1, j + 1] == '.')
{
res += 'U';
}
// Checking for 'O'
else if (arr[1, j + 1] == '.')
{
res += 'O';
}
// Check for 'I'
else if (arr[1, j] == '.' &&
arr[1, j + 2] == '.')
{
res += 'I';
}
// Otherwise, 'E'
else
{
res += "E";
}
j += 3;
}
Console.WriteLine(res);
}
}
// This code is contributed by PrinciRaj1992