class A:
    def __init__(self, txt: str):
        self.p: B = None
        self.x: G = None
        self.t: H = None
        self.w: H = None
        self.r: F = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.s: H = None
        self.q: A = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: B = None
        self.x: A = None
        self.r: F = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: B = None
        self.p: D = None
        self.o: I = None
        self.x: A = None
        self.u: H = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: I = None
        self.w: I = None
        self.q: A = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: I = None
        self.y: B = None
        self.z: F = None
        self.p: I = None
        self.r: B = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.x: E = None
        self.s: H = None
        self.q: A = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: B = None
        self.x: A = None
        self.r: F = None
        self.s: E = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: B = None
        self.p: D = None
        self.o: I = None
        self.x: A = None
        self.u: H = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.o: I = None
        self.w: I = None
        self.q: A = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: C = None
        self.t: I = None
        self.y: B = None
        self.z: F = None
        self.p: I = None
        self.r: B = None
        self.o: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: B = None
        self.x: A = None
        self.txt = txt

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

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