In a competition, 4 participants can win either a gold medal, a silver medal, or a bronze medal. If each medal is awarded only once, how many different ways can the medals be awarded to the participants?
Assume that all participants are distinguishable, and the order in which the medals are awarded is important.