i've been trying to get this to work for hours and I've tried to fix it in multiple ways and it still doesn't work.

```
# this creates my class "bucket"
class bucket:
    def __init__(self, water, capcity):
        self.water = water
        self.capcity = capcity

# here I create my objects
bucket1 = bucket(0, 3)
bucket2 = bucket(0, 5)

# this is the printing code to print how much water there is in every bucket
def pr_v():
    print("Bucket_ONE " + str(bucket1.water) + "L")
    print("Bucket_TWO " + str(bucket2.water) + "L")
    print(" ")

# this is where my problem is
# this scirpt is supposed to trasfer water from the pouring bucket (p_bucket) to the receiving bucket untill the receiving bucket reaches it's
# capacity or the pouring bucket runs out of water
def pour_water(p_bucket, g_bucket):
    while g_bucket.capcity >= g_bucket.water or p_bucket.water != -1:
        if g_bucket.capcity != g_bucket.water or p_bucket.water != -1:

            if g_bucket.capcity < g_bucket.water:
                bucket.water = g_bucket.capcity
                break
            p_bucket.water -= 1
            g_bucket.water += 1
            pr_v()

    if p_bucket.water == -1:
        p_bucket.water = 0

# this fills the bucket to it's capacity 
def fill_water(self):
    self.water = self.capcity

fill_water(bucket2)
pour_water(bucket2, bucket1)
pr_v()

```

when I execute the code this happens

```
Bucket_ONE 1L
Bucket_TWO 4L

Bucket_ONE 2L
Bucket_TWO 3L

```

it's supposed to stop here because bucket 1 reaches its capacity

↓

```
Bucket_ONE 3L
Bucket_TWO 2L

Bucket_ONE 4L
Bucket_TWO 1L

Bucket_ONE 4L
Bucket_TWO 1L

```

why does this happen?
Im new to coding so I might not know a lot of stuff

Thanks