class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: B = None
        self.u: A = None
        self.txt = txt

l = A("l")
b = B("b")
e = C("e")
m = B("m")
c = A("c")
k = A("k")
n = B("n")

l.z = e
l.y = e
l.o = e
b.o = c
b.p = m
e.t = k
e.w = b
e.u = c
m.o = k
m.p = b
c.z = e
c.y = e
c.o = e
k.z = e
k.y = e
k.o = e
n.o = k
n.p = b
assert l.y.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: C = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: A = None
        self.p: B = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: B = None
        self.u: A = None
        self.txt = txt

l = A("l")
b = B("b")
e = C("e")
m = B("m")
c = A("c")
k = A("k")
n = B("n")

l.z = e
l.y = e
l.o = e
b.o = c
b.p = m
e.t = k
e.w = b
e.u = c
m.o = k
m.p = b
c.z = e
c.y = e
c.o = e
k.z = e
k.y = e
k.o = e
n.o = k
n.p = b
assert l.y.u.o.txt == "e"