import random


def particle_movement_z(time):
    """
    Generates a random movement in the Z label

    Parameter:
    time (int): Time step

    Return:
    z (int): Z position
    """
    z = 0
    directions = [1, -1]
    for i in range(time):
        z = z + random.choice(directions)
    return z