Input-
Map<String,String> inputMap;
The contents of the map are --
{a,{A:0,B:2,C:1,D:0}}
{b,{A:2,B:0,C:3}}
Output
Map<String,Map<String,Integer>>outputMap;
The content of the output Map should contain
{A,{{a,0},{b,2}}}
{B,{{a,2},{b,0}}}
{C,{{a,1},{b,3}}}
{D,{{a,0}}}