You may train your model and prepare your training data in any way you choose when using the train and validation set data. There are no restrictions on how you use the provided train and validation sets.
Your model needs to be able to perform inference on new data one sample at a time and make predictions on the target label classes in accordance with the submission format.