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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: B = None
        self.y: A = None
        self.u: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: B = None
        self.y: A = None
        self.u: E = None
        self.o: E = None
        self.txt = txt

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

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

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

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