class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: F = None
        self.x: A = None
        self.u: E = None
        self.o: J = None
        self.p: F = None
        self.t: A = None
        self.s: H = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: E = None
        self.q: F = None
        self.x: A = None
        self.u: E = None
        self.o: J = None
        self.p: F = None
        self.t: A = None
        self.s: H = None
        self.z: D = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: A = None
        self.txt = txt

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

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