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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: E = None
        self.z: D = None
        self.u: G = None
        self.y: D = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: G = None
        self.t: D = None
        self.p: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: E = None
        self.z: D = None
        self.u: G = None
        self.y: D = None
        self.o: H = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: G = None
        self.t: D = None
        self.p: D = None
        self.txt = txt

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

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

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