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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: C = None
        self.u: G = None
        self.p: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: G = None
        self.r: E = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: F = None
        self.z: C = None
        self.q: H = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: D = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.s: C = None
        self.u: G = None
        self.p: D = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: H = None
        self.v: G = None
        self.r: E = None
        self.o: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: F = None
        self.z: C = None
        self.q: H = None
        self.s: A = None
        self.txt = txt

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

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

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