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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.u: C = None
        self.q: D = None
        self.y: E = None
        self.w: F = None
        self.s: E = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: C = None
        self.o: E = None
        self.q: A = None
        self.s: G = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.t: C = None
        self.u: E = None
        self.p: B = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: E = None
        self.u: A = None
        self.v: A = None
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: E = None
        self.z: C = None
        self.u: C = None
        self.q: D = None
        self.y: E = None
        self.w: F = None
        self.s: E = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: C = None
        self.o: E = None
        self.q: A = None
        self.s: G = None
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.q: D = None
        self.t: C = None
        self.u: E = None
        self.p: B = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: E = None
        self.u: A = None
        self.v: A = None
        self.r: G = None
        self.txt = txt

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

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