





"""simple docstring"""






from __future__ import annotations

from collections import deque
from collections.abc import Iterator
from dataclasses import dataclass



@dataclass
class 	lowerCAmelCase					:
       lowerCAmelCase__						 =  42
       lowerCAmelCase__						 =  42



class 	lowerCAmelCase					:






       def __init__(   self    ,  a__     ):
              _UpperCAmelCase     =     [[] for _ in range(a__     )]
              _UpperCAmelCase     =     size






       def __getitem__(   self    ,  a__     ):
              return iter(self._graph[vertex]     )






       @property
       def 							__A (   self     ):
              return self._size






       def 							__A (   self    ,  a__    ,  a__    ,  a__     ):
              if weight not in (0, 1):
                     raise ValueError('Edge weight must be either 0 or 1.'     )

              if to_vertex < 0 or to_vertex >= self.size:
                     raise ValueError('Vertex indexes must be in [0; size).'     )

              self._graph[from_vertex].append(Edge(a__    ,  a__     )     )






       def 							__A (   self    ,  a__    ,  a__     ):
              _UpperCAmelCase     =     deque([start_vertex]     )
              _UpperCAmelCase     =     [None] * self.size
              _UpperCAmelCase     =     0

              while queue:
                     _UpperCAmelCase     =     queue.popleft()
                     _UpperCAmelCase     =     distances[current_vertex]
                     if current_distance is None:
                            continue

                     for edge in self[current_vertex]:
                            _UpperCAmelCase     =     current_distance + edge.weight
                            _UpperCAmelCase     =     distances[edge.destination_vertex]
                            if (
                                isinstance(a__    ,  a__     )
                                and new_distance >= dest_vertex_distance
                            ):
                                   continue
                            _UpperCAmelCase     =     new_distance
                            if edge.weight == 0:
                                   queue.appendleft(edge.destination_vertex     )
                            else:
                                   queue.append(edge.destination_vertex     )

              if distances[finish_vertex] is None:
                     raise ValueError('No path from start_vertex to finish_vertex.'     )

              return distances[finish_vertex]


if __name__ == "__main__":
    import doctest

    doctest.testmod()













"""simple docstring"""






def       __lowerCamelCase    (       SCREAMING_SNAKE_CASE							)		->       list:






       """simple docstring"""




       _UpperCAmelCase     =     False
       while is_sorted is False:  # Until all the indices are traversed keep looping
              _UpperCAmelCase     =     True
              for i in range(0,len(SCREAMING_SNAKE_CASE							) - 1,2							):  # iterating over all even indices
                     if input_list[i] > input_list[i + 1]:
                            _UpperCAmelCase    ,							_UpperCAmelCase     =     input_list[i + 1], input_list[i]
                            # swapping if elements not in order
                            _UpperCAmelCase     =     False

              for i in range(1,len(SCREAMING_SNAKE_CASE							) - 1,2							):  # iterating over all odd indices
                     if input_list[i] > input_list[i + 1]:
                            _UpperCAmelCase    ,							_UpperCAmelCase     =     input_list[i + 1], input_list[i]
                            # swapping if elements not in order
                            _UpperCAmelCase     =     False
       return input_list


if __name__ == "__main__":
    print('''Enter list to be sorted''')
    lowerCAmelCase_			=							[int(x) for x in input().split()]
    # inputing elements of the list in one line
    lowerCAmelCase_			=							odd_even_sort(input_list)
    print('''The sorted list is''')
    print(sorted_list)






