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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.u: F = None
        self.v: A = None
        self.txt = txt

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

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

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

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

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