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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: F = None
        self.o: F = None
        self.z: B = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: E = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: E = None
        self.q: F = None
        self.v: B = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: D = None
        self.u: G = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.q: F = None
        self.o: F = None
        self.z: B = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.y: E = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: C = None
        self.p: E = None
        self.q: F = None
        self.v: B = None
        self.s: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.t: D = None
        self.u: G = None
        self.r: D = None
        self.txt = txt

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

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