class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.y: C = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.s: C = None
        self.o: B = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.u: B = None
        self.t: C = None
        self.p: F = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: A = None
        self.q: B = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

j = A("j")
a = B("a")
m = C("m")
g = D("g")
l = E("l")
e = F("e")
b = E("b")
d = F("d")
k = B("k")
f = C("f")

j.w = g
j.u = m
j.y = m
j.r = f
a.w = g
a.z = g
m.p = a
m.o = a
m.x = j
m.s = f
m.w = b
g.x = f
l.v = j
l.s = j
l.u = k
l.t = f
l.p = d
l.y = g
e.w = g
e.v = g
e.r = j
e.q = k
e.p = l
b.v = j
b.s = j
b.u = k
b.t = f
b.p = e
b.y = g
d.w = g
d.v = g
d.r = j
d.q = k
d.p = l
k.w = g
k.z = g
f.p = a
f.o = a
f.x = j
f.s = m
f.w = l
assert b.y.x.s.w.t.w.p.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.u: C = None
        self.y: C = None
        self.r: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: A = None
        self.s: C = None
        self.o: B = None
        self.w: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: A = None
        self.u: B = None
        self.t: C = None
        self.p: F = None
        self.y: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.r: A = None
        self.q: B = None
        self.v: D = None
        self.p: E = None
        self.txt = txt

j = A("j")
a = B("a")
m = C("m")
g = D("g")
l = E("l")
e = F("e")
b = E("b")
d = F("d")
k = B("k")
f = C("f")

j.w = g
j.u = m
j.y = m
j.r = f
a.w = g
a.z = g
m.p = a
m.o = a
m.x = j
m.s = f
m.w = b
g.x = f
l.v = j
l.s = j
l.u = k
l.t = f
l.p = d
l.y = g
e.w = g
e.v = g
e.r = j
e.q = k
e.p = l
b.v = j
b.s = j
b.u = k
b.t = f
b.p = e
b.y = g
d.w = g
d.v = g
d.r = j
d.q = k
d.p = l
k.w = g
k.z = g
f.p = a
f.o = a
f.x = j
f.s = m
f.w = l
assert b.y.x.s.w.t.w.p.p.txt == "l"