With the trainloader, the labels would only correspond to 0, 1 and 2. This will create a problem, you would not be able to distinguish from which subfolder the image comes from.
To iterate upon the problem, you have three folders and three sub-folders in each of them. This means that you have in total 3*3=9 individual classes.
I would suggest you to do the following:

Make sure the classes of every <>_dataset is distinct.for ind, c in enumerate(A_dataset.classes):
    A_dataset.classes[ind] = f"A_{c}"

for ind, c in enumerate(B_dataset.classes):
    B_dataset.classes[ind] = f"B_{c}"

for ind, c in enumerate(C_dataset.classes):
    C_dataset.classes[ind] = f"C_{c}"


ConcatDataset holds the order in which the datasets are provided unless the shuffle=True parameter is present. If you keep a tab of the counts of data you could see from which dataset the data comes from.

A minimal implementation can be seen here in this GitHub gist.

If the gist does not load, please use nbviewer