





'''simple docstring'''





def    __UpperCAmelCase(      lowercase_      ):

       if len(UpperCamelCase__      ) <= 1:
              return [tuple(UpperCamelCase__      )]

       _lowerCamelCase							:     Optional[int]	=		[]

       def generate(lowercase_ ,    lowercase_      ):
              _lowerCamelCase							:     List[Any]	=		[0] * n
              res.append(tuple(UpperCamelCase__      )      )

              _lowerCamelCase							:     Optional[Any]	=		0
              while i < n:
                     if c[i] < i:
                            if i % 2 == 0:
                                   _lowerCamelCase							:     Optional[int]	=		arr[i], arr[0]
                            else:
                                   _lowerCamelCase							:     Optional[int]	=		arr[i], arr[c[i]]
                            res.append(tuple(UpperCamelCase__      )      )
                            c[i] += 1
                            _lowerCamelCase							:     Any	=		0
                     else:
                            _lowerCamelCase							:     Optional[Any]	=		0
                            i += 1

       generate(len(UpperCamelCase__      ) ,    UpperCamelCase__      )
       return res


if __name__ == "__main__":
       _lowerCamelCase			       =      input('Enter numbers separated by a comma:\n').strip()
       _lowerCamelCase			       =      [int(item) for item in user_input.split(',')]
       print(heaps(arr))








def    __UpperCAmelCase(      lowercase_ = 10_00      ):
       _lowerCamelCase							:     Optional[int]	=		2**power
       _lowerCamelCase							:     Optional[int]	=		0
       while n:
              _lowerCamelCase,  _lowerCamelCase							:     Optional[Any]	=		r + n % 10, n // 10
       return r


if __name__ == "__main__":
       print(solution(int(str(input()).strip())))

