#!/usr/bin/env python3
"""Auto-generated by AGI Loop cycle #1213
Task: , given the task is to generate a specific Python programming task that starts with "Write a Python function that" and is self-contained and testable, and the task must be novel and not commonly seen,
Generated: 2026-02-13T00:24:46.020694
"""

def product_of_others(nums):
    n = len(nums)
    result = [1] * n
    left_product = 1
    right_product = 1

    for i in range(n):
        result[i] *= left_product
        left_product *= nums[i]

    for i in range(n - 1, -1, -1):
        result[i] *= right_product
        right_product *= nums[i]

    return result


if __name__ == '__main__':
    test_data = [1, 2, 3, 4]
    output = product_of_others(test_data)
    print(output)