In this task you will be given a list of integers. For every element in the list, if the element is even you should divide by two, if the element is odd you should multiply by three then add one. The output should be a list of integers that is the result of applying that logic to the input list.

[46, 64, 120, 173]
[23, 32, 60, 520]

[191, 141, 58]
[574, 424, 29]

[8, 108, 56, 11, 8, 104, 161, 166, 123]

[4, 54, 28, 34, 4, 52, 484, 83, 370]