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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: F = None
        self.q: B = None
        self.y: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.q: A = None
        self.u: E = None
        self.txt = txt

c = A("c")
l = B("l")
f = C("f")
a = D("a")
n = E("n")
e = F("e")
d = G("d")
b = H("b")
m = F("m")
j = F("j")

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.w: F = None
        self.y: A = None
        self.t: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: F = None
        self.q: B = None
        self.y: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: E = None
        self.q: A = None
        self.u: E = None
        self.txt = txt

c = A("c")
l = B("l")
f = C("f")
a = D("a")
n = E("n")
e = F("e")
d = G("d")
b = H("b")
m = F("m")
j = F("j")

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