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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.x: E = None
        self.txt = txt

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

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

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