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

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.u: F = None
        self.r: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: D = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.o: F = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: A = None
        self.u: F = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

i = A("i")
c = B("c")
a = C("a")
n = D("n")
g = E("g")
h = F("h")
e = G("e")
f = F("f")
l = D("l")

i.q = a
i.u = e
c.y = n
c.z = n
c.r = g
c.w = g
c.q = g
c.t = i
a.t = l
a.o = e
a.u = f
a.r = i
a.s = i
n.z = a
n.t = l
n.x = e
g.y = e
g.p = e
g.o = f
g.z = n
h.z = i
h.o = i
h.u = f
h.r = e
e.q = h
f.z = i
f.o = i
f.u = h
f.r = e
l.z = a
l.t = n
l.x = e
assert a.t.t.t.z.s.q.o.q.txt == "
class A:
    def __init__(self, txt: str):
        self.q: C = None
        self.u: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: G = None
        self.u: F = None
        self.r: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: D = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: G = None
        self.p: G = None
        self.o: F = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.o: A = None
        self.u: F = None
        self.r: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

i = A("i")
c = B("c")
a = C("a")
n = D("n")
g = E("g")
h = F("h")
e = G("e")
f = F("f")
l = D("l")

i.q = a
i.u = e
c.y = n
c.z = n
c.r = g
c.w = g
c.q = g
c.t = i
a.t = l
a.o = e
a.u = f
a.r = i
a.s = i
n.z = a
n.t = l
n.x = e
g.y = e
g.p = e
g.o = f
g.z = n
h.z = i
h.o = i
h.u = f
h.r = e
e.q = h
f.z = i
f.o = i
f.u = h
f.r = e
l.z = a
l.t = n
l.x = e
assert a.t.t.t.z.s.q.o.q.txt == "h"