Program to solve SRAT