In this task, you are given inputs 'i', 'j', and A, where 'i' and 'j' are integers and A is a list. A list is shown by two brackets and comma-separated numbers and characters inside, like ['1', '12', 'l']. You need to concatenate all elements of A from the ith element to the jth element, and then reverse the resulting string. 'i' and 'j' will be non-negative, and will always have a value less than the length of A. 'i' will always be less than 'j'. Perform the operations in order, i.e., do not reverse first and then concatenate.
5, 21, ['A', '2055', '6311', '4251', 'd', 'N', 'i', '5081', 'Y', 'e', '5841', '1659', '1145', 'L', '7947', 'X', '399', '6977', '297', 'f', '8171', 'L', 'B', 'h', '3587']