class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: H = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: G = None
        self.u: A = None
        self.v: C = None
        self.r: D = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: H = None
        self.t: G = None
        self.o: H = None
        self.p: B = None
        self.y: F = None
        self.z: G = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.w: A = None
        self.p: B = None
        self.z: C = None
        self.v: H = None
        self.r: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: G = None
        self.u: A = None
        self.v: C = None
        self.r: D = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.v: H = None
        self.t: G = None
        self.o: H = None
        self.p: B = None
        self.y: F = None
        self.z: G = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: H = None
        self.x: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: F = None
        self.w: A = None
        self.p: B = None
        self.z: C = None
        self.v: H = None
        self.r: C = None
        self.txt = txt

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

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

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