Although I am using hardhat, I believe it’s because your Interface and your Contract are both named A.
Generally interface names should start with I, in your case it should be named IA to follow naming conventions to signify it being an interface.
Attached is an image to show the compilation. You might want to inherit your contracts and declare some of them as abstract if you are trying to get functionality from one contract to another.