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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: C = None
        self.t: H = None
        self.o: F = None
        self.s: E = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: B = None
        self.y: G = None
        self.s: H = None
        self.z: B = None
        self.v: G = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: E = None
        self.p: E = None
        self.y: C = None
        self.w: G = None
        self.z: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: C = None
        self.t: H = None
        self.o: F = None
        self.s: E = None
        self.w: H = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: B = None
        self.y: G = None
        self.s: H = None
        self.z: B = None
        self.v: G = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: C = None
        self.r: E = None
        self.p: E = None
        self.y: C = None
        self.w: G = None
        self.z: G = None
        self.txt = txt

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

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