Classification of three-way data by the dissimilarity representation