If ord ( S [ i ] ) anord ( ' a ) rd ( T [ i ] ) ▁ haord ( ' a ) different parities
if ( value [ ord ( S [ i ] ) - ord ( ' a ' ) ] % 2 == 0 and value [ ord ( T [ i ] ) - ord ( ' a ' ) ] % 2 == 1 or value [ ord ( S [ i ] ) - ord ( ' a ' ) ] % 2 == 1 and value [ ord ( T [ i ] ) - ord ( ' a ' ) ] % 2 == 0 ) : NEW_LINE INDENT flag = False NEW_LINE DEDENT