# Problem Description
This problem involves determining the relationship between two points in a layered coordinate system. The layers are organized in a triangular grid pattern, expanding outward from the origin. Given two points, we need to classify their relationship into one of three categories: "A" (Same Layer), "B" (Adjacent Layer), or "C" (Non-Adjacent Layer).

# Visual Facts
1. The coordinate system has both x and y axes starting from 0.
2. Points are organized in layers (L0 to L4 shown).
3. Three types of relationships are illustrated:
   - "A": Same Layer (orange arrows).
   - "B": Adjacent Layer (green arrows).
   - "C": Non-Adjacent Layer (red arrows).
4. Layer 0 is a single point at the origin (0,0).
5. Each subsequent layer forms a diagonal line.
6. Points only exist at integer coordinates.
7. The maximum layer shown is L4.
8. Each layer N forms a diagonal line with points (N, 0) to (0, N).

# Visual Patterns
1. **Layer Determination Pattern**:
   - A point's layer number is determined by the sum of its x and y coordinates.
   - For any point (x, y), its layer = x + y.

2. **Relationship Classification Rules**:
   - "A": Points are on the same layer.
     - Example: Two points both on L4.
   - "B": Points are on consecutive layers.
     - Example: Point on L2 connected to point on L3.
   - "C": Points are separated by at least one layer.
     - Example: Point on L1 connected to point on L3.

# Solution
from typing import Tuple

def solution(point1: Tuple[int, int], point2: Tuple[int, int]) -> str:
    """
    Determine the relationship between two points based on their layers.
    
    Parameters:
        point1 (Tuple[int, int]): The coordinates of the first point, where both x and y are non-negative integers.
        point2 (Tuple[int, int]): The coordinates of the second point, where both x and y are non-negative integers.
    
    Returns:
        str: Return 'A', 'B', or 'C'.
    """
    layer1 = point1[0] + point1[1]
    layer2 = point2[0] + point2[1]
    
    if layer1 == layer2:
        return 'A'
    elif abs(layer1 - layer2) == 1:
        return 'B'
    else:
        return 'C'

# Test Script
def test():
    test_cases = [
        ((2, 0), (2, 1), 'B'),
        ((1, 1), (0, 2), 'A'),
        ((0, 3), (1, 2), 'A'), 
        ((0, 0), (4, 0), 'C'),
        ((1, 0), (2, 0), 'B'),
        ((0, 0), (0, 0), 'A'),
        ((3, 10), (4, 4), 'C'),
        ((5, 6), (7, 4), 'A'),
        ((9, 9), (9, 10), 'B'),
        ((999, 1002), (1000, 1000), 'B'),
        ((0, 0), (0, 1), 'B'),
        ((0, 0), (1, 0), 'B')
    ]
    for point1, point2, expected_output in test_cases:
        try:
            output = solution(point1, point2)
        except Exception as e:
            error_message = (
                f"An exception occurred while running the test case:\n"
                f"`point1`: {point1}\n"
                f"`point2`: {point2}\n\n"
                f"Exception: '{str(e)}'"
            )
            assert False, error_message

        if output != expected_output:
            error_message = (
                f"The following Test Case failed:\n"
                f"`point1`: {point1}\n" 
                f"`point2`: {point2}\n\n"
                f"Actual Output: {output}\n"
                f"Expected Output: {expected_output}"
            )
            assert False, error_message

test()