I am trying to differentiate between participants' (from different groups) ability to classify pictures into categories. Each participant watched the same pictures and was asked to categorize them into categories according to their perceived similarities.

My data looks like this:

Categorization (pictures groupings)

Number of participants using this categorization in Group 1

Number of participants using this categorization in Group 2

Number of participants using this categorization in Group 3

A

10

4

1

B

10

2

1

C

10

4

0

D

1

3

2

How do I conduct a Fisher's exact test (and pairwise comparisons) on this data?

Your suggestions and help are much appreciated. Thank you!

Thank you. Yes.
I get the following error:
Error in fisher.test(data) :
all entries of 'x' must be nonnegative and finite.
Thanks in advance for trying to help.

in R you can access function documentation with the question mark symbol in the console like this ?fisher.test
I read:
If x is a matrix, it is taken as a two-dimensional contingency table, and hence its entries should be nonnegative integers.

Is your data of this form? if not you should transform it.
For a resource on how to transform data in R, I recommend