BASH - Make a table of grep output

Hello everyone.

I am a total novice to coding, but am wondering the easiest way to generate a table from grep count data.

My grep count output file looks like this:
AAR34355.1
./006D_id70.m8:0
./20D_id70.m8:0
./28D_id70.m8:0
AAR38850.1
./006D_id70.m8:0
./20D_id70.m8:2
./28D_id70.m8:4
A13520.1
./006D_id70.m8:0
./20D_id70.m8:0
./28D_id70.m8:0

I need an output to look more like this:
./006D_id70.m8 ./20D_id70.m8 ./28D_id70.m8
AAR34355.1 0 0 0
AAR38850.1 0 2 4
A13520.1 0 0 0

or at least a delimited equivalent.

Forgive my description, as I am pretty new to this.

Is there a relatively simple way of formatting the data this way?

Many thanks for any help, it will be much appreciated.