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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: F = None
        self.u: B = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: I = None
        self.s: J = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: D = None
        self.p: J = None
        self.q: A = None
        self.x: I = None
        self.w: D = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: F = None
        self.u: C = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: B = None
        self.v: H = None
        self.u: I = None
        self.r: H = None
        self.z: B = None
        self.s: B = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.o: F = None
        self.u: B = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: I = None
        self.s: J = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: D = None
        self.p: J = None
        self.q: A = None
        self.x: I = None
        self.w: D = None
        self.s: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: F = None
        self.u: C = None
        self.s: B = None
        self.z: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: H = None
        self.q: B = None
        self.v: H = None
        self.u: I = None
        self.r: H = None
        self.z: B = None
        self.s: B = None
        self.x: F = None
        self.txt = txt

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

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