class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.y: C = None
        self.p: F = None
        self.z: H = None
        self.u: E = None
        self.r: C = None
        self.o: E = None
        self.q: F = None
        self.w: J = None
        self.t: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: A = None
        self.p: G = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.u: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: G = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.t: B = None
        self.s: H = None
        self.x: J = None
        self.u: E = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: C = None
        self.q: C = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: B = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: D = None
        self.q: C = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: A = None
        self.p: G = None
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: C = None
        self.u: A = None
        self.o: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: G = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.t: B = None
        self.s: H = None
        self.x: J = None
        self.u: E = None
        self.o: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.v: C = None
        self.q: C = None
        self.p: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: G = None
        self.w: B = None
        self.s: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: D = None
        self.q: C = None
        self.t: E = None
        self.txt = txt

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

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