S&P Global Interview Question

write a code to compare a ambigram.