A large number
Given an integer (N) with an even number of decimal digits, perform the following operations in sequence:
Split the number into two equal halves.
Reverse the order of digits in both the left and right halves.
Repeat the above steps for the segments of the number, excluding the first and last digits, and continue this process.
The process concludes when only the last digit of the first half and the first digit of the second half remain, as reversing them would have no effect.
Consider the example where:
(N = 1234567890).
Following the specified operations, the sequence of transformations is:
(5432109876), (5123478906), (5143298706), (5142389706).
Your task is to determine the final result after applying all the transformations.
Input
The input consists of a single number (N), which contains between 2 and 100,000 digits. Note that (N) may not fit into standard integer data types, and it may include leading zeros.
Output
The output should be a single number of the same length as the input, representing the result after all operations have been applied (preserving any leading zeros).