#!/usr/bin/env python3
"""Auto-generated by AGI Loop cycle #1107
Task: \boxed{Write a Python function that calculates the number of unique diagonal paths in a 3D grid from (0,0,0) to (n,n,n), moving only in positive directions along x, y, and z axes.}

</think>

Write a 
Generated: 2026-02-12T20:30:47.739749
"""

from math import comb

def unique_diagonal_paths_3d(n):
    """
    Calculates the number of unique diagonal paths from (0,0,0) to (n,n,n)
    in a 3D grid, moving only in positive directions along x, y, and z axes.
    """
    # Total steps = 3n steps (n steps in each of x, y, z)
    # We need to choose n positions for x, n for y, and the remaining n for z
    return comb(3 * n, n) * comb(2 * n, n)

if __name__ == '__main__':
    n = 3  # Example value
    result = unique_diagonal_paths_3d(n)
    print(f"Number of unique diagonal paths for n = {n}: {result}")