Just thought I'd share a solution I didn't see here yet:
18^22^10 is the same as (14+4)^22^10, so we can focus on the remainder 4^22^10 when divided by 7.
4^n provides remainders of 4, 2 and 1 when divided by 7 for values of n = 3k+1, 3k+2, and 3k+3 respectively, so we need to find the remainder of 22^10 when divided by 3.
22^10 is the same as (21+1)^10, so we can focus on the remainder of 1^10 when divided by 3, which is 1.
Thus, remainder of 4^22^10 is the same as the remainder of 4^(3k+1)
...
18^22^10 is the same as (14+4)^22^10, so we can focus on the remainder 4^22^10 when divided by 7.
4^n provides remainders of 4, 2 and 1 when divided by 7 for values of n = 3k+1, 3k+2, and 3k+3 respectively, so we need to find the remainder of 22^10 when divided by 3.
22^10 is the same as (21+1)^10, so we can focus on the remainder of 1^10 when divided by 3, which is 1.
Thus, remainder of 4^22^10 is the same as the remainder of 4^(3k+1)
...