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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: G = None
        self.t: B = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: B = None
        self.x: D = None
        self.v: D = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.y: F = None
        self.p: G = None
        self.q: A = None
        self.txt = txt

n = A("n")
j = B("j")
e = C("e")
a = D("a")
d = E("d")
c = F("c")
k = G("k")
l = G("l")
i = C("i")
b = D("b")

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

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

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: G = None
        self.t: B = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.z: B = None
        self.x: D = None
        self.v: D = None
        self.u: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: C = None
        self.y: F = None
        self.p: G = None
        self.q: A = None
        self.txt = txt

n = A("n")
j = B("j")
e = C("e")
a = D("a")
d = E("d")
c = F("c")
k = G("k")
l = G("l")
i = C("i")
b = D("b")

n.t = l
n.q = b
n.y = c
n.z = d
j.s = b
j.t = b
j.v = a
e.x = n
e.u = l
e.s = l
e.t = j
a.p = j
a.z = j
a.x = b
a.v = b
a.u = d
d.o = a
c.p = a
c.z = d
c.y = k
c.o = n
k.z = d
k.v = e
k.y = c
k.p = l
k.q = n
l.z = d
l.v = e
l.y = c
l.p = k
l.q = n
i.x = n
i.u = l
i.t = j
i.s = k
b.p = j
b.z = j
b.x = a
b.v = a
b.u = d
assert n.z.o.u.o.x.u.txt == "d"