class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: E = None
        self.p: B = None
        self.x: J = None
        self.t: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: H = None
        self.s: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.o: H = None
        self.s: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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