S&P Global interview question

write a code to compare a ambigram.