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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: H = None
        self.t: D = None
        self.o: A = None
        self.p: A = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.w: C = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: C = None
        self.txt = txt

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

i = A("i")
j = B("j")
e = C("e")
a = D("a")
h = E("h")
g = F("g")
k = G("k")
d = H("d")
n = C("n")

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.q: H = None
        self.t: D = None
        self.o: A = None
        self.p: A = None
        self.z: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: D = None
        self.w: C = None
        self.q: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.y: C = None
        self.txt = txt

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

i = A("i")
j = B("j")
e = C("e")
a = D("a")
h = E("h")
g = F("g")
k = G("k")
d = H("d")
n = C("n")

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