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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.r: F = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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