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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: I = None
        self.x: G = None
        self.s: I = None
        self.u: F = None
        self.o: F = None
        self.t: C = None
        self.w: G = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: C = None
        self.o: I = None
        self.p: C = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.v: C = None
        self.p: E = None
        self.x: A = None
        self.t: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: I = None
        self.x: G = None
        self.s: I = None
        self.u: F = None
        self.o: F = None
        self.t: C = None
        self.w: G = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: C = None
        self.o: I = None
        self.p: C = None
        self.y: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.u: G = None
        self.v: C = None
        self.p: E = None
        self.x: A = None
        self.t: A = None
        self.txt = txt

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

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