Check if a palindromic string can be obtained by concatenating substrings split from same indices of two given strings
Given two strings A and B of length N, the task is to check if any of the two strings formed by splitting both the strings at any index i (0 ⤠i ⤠N - 1) and concatenating A[0, i] and B[i, N - 1] or A[i, N - 1] and B[0, i] respectively, form a palindromic string or not. If found to be true, print "Y