deterministic algorithm for find the exact min-cut of a graph if it’s at most 2

Give a deterministic algorithm for computing the exact min-cut of a graph if it’s
at most 2. If the min-cut is bigger than 2, the algorithm should output "bigger
than 2".