Step 1: Remove the right hand side (RHS) bolts from the spindle.
Step 2: Remove the spindle from the wheel hub. The sludge was due to a mixture of water sipping into the hub, blended with grease. It always a big No No to ride through a water/river a foot deep due this consequences.
Step 3: The ball bearing resides in the cup a blend of what used to be a grease. Remove the ball bearing by picking it up using a magnetized screwdriver.
Step 4: Wipe it clean those sludge and some traces of sand on both on side of the hub's cones and anywhere you can see it. Cotton buds would be the best tool you should use.
Step 5: Wipe it clean those sludge on these ball bearings. 10 balls bearing on each side for this particular Shimano hub.
Step 6: Put the grease on the cups on both side. The grease helps to hold the ball bearing in place before you can shove the spindle back into the hub.
Step 7: Tighten the bolts to the point the wheel spin smoothly but it do not move left and right of the spindle.