Input (stdin)

- 1
- 1
- 1
- 2

Expected Output

- [[0, 0, 0], [0, 0, 1], [0, 1, 0], [1, 0, 0], [1, 1, 1]]

```
if __name__ == '__main__':
x = int(input())
y = int(input())
z = int(input())
n = int(input())
result = sorted(
[ [i,j,k] for k in range(0,z+1)
for j in range(0,y + 1)
for i in range(0,x + 1)
if (i + j + k) != n ]
)
print(result)
```