Before powering up the new stack for the first time, it is highly recommended that if you want switch 1 to be the master, switch 2 to be the secondary and switch 3 to be tertiary, the best method is to power up each member of the switch one at a time in the order you want them to be.
In English: Power up switch 1 first, wait for about 10 seconds, power up switch 2, wait for another 10 seconds, and then power up switch 3.
This will guarantee that the stack master election will elect switch 1 because switch 1 was powered up first.
Once all the stack members have joined the stack, manually configure the priority to ensure the same:
config t
switch 1 prio 15
switch 2 prio 13
switch 3 prio 11
end
wr