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

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

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

i = A("i")
e = B("e")
g = C("g")
l = C("l")
j = C("j")
d = A("d")
m = B("m")
b = B("b")
f = A("f")
k = B("k")

i.w = f
i.x = g
i.z = g
e.v = d
e.u = f
e.x = j
g.x = l
g.w = j
g.u = e
l.x = j
l.w = g
l.u = m
j.x = l
j.w = l
j.u = e
d.w = f
d.x = j
d.z = g
m.v = i
m.u = f
m.x = l
b.v = i
b.u = d
b.x = g
f.w = d
f.x = g
f.z = g
k.v = f
k.u = d
k.x = l
assert e.x.u.x.w.w.w.w.txt == "
class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: C = None
        self.z: C = None
        self.txt = txt

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

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

i = A("i")
e = B("e")
g = C("g")
l = C("l")
j = C("j")
d = A("d")
m = B("m")
b = B("b")
f = A("f")
k = B("k")

i.w = f
i.x = g
i.z = g
e.v = d
e.u = f
e.x = j
g.x = l
g.w = j
g.u = e
l.x = j
l.w = g
l.u = m
j.x = l
j.w = l
j.u = e
d.w = f
d.x = j
d.z = g
m.v = i
m.u = f
m.x = l
b.v = i
b.u = d
b.x = g
f.w = d
f.x = g
f.z = g
k.v = f
k.u = d
k.x = l
assert e.x.u.x.w.w.w.w.txt == "l"