import java.time.Instant;

public class Main {
	public static void main(String[] args) {
		String s1 = "2021-08-07T03:00:01-07:00";
		String s2 = "2021-08-07T15:30:00+05:30";

		Instant instant1 = Instant.parse(s1);
		Instant instant2 = Instant.parse(s2);

		System.out.println(s1 + " represents " + instant1);
		System.out.println(s1 + " represents " + instant2);

		if (instant1.isBefore(instant2)) {
			System.out.println(s1 + " is before " + s2);
		} else if (instant1.isAfter(instant2)) {
			System.out.println(s1 + " is after " + s2);
		} else {
			System.out.println("The strings represent the same instants.");
		}
	}
}