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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: I = None
        self.o: F = None
        self.x: H = None
        self.v: C = None
        self.t: F = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.z: B = None
        self.q: E = None
        self.u: B = None
        self.x: F = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.p: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: I = None
        self.o: F = None
        self.x: H = None
        self.v: C = None
        self.t: F = None
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: H = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: I = None
        self.r: D = None
        self.z: B = None
        self.q: E = None
        self.u: B = None
        self.x: F = None
        self.s: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: F = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: E = None
        self.p: E = None
        self.txt = txt

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

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