class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: H = None
        self.q: E = None
        self.r: E = None
        self.s: F = None
        self.t: H = None
        self.z: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: A = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: A = None
        self.u: D = None
        self.q: A = None
        self.txt = txt

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

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

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

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