class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: I = None
        self.u: F = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: H = None
        self.s: A = None
        self.p: B = None
        self.v: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: F = None
        self.r: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: H = None
        self.q: I = None
        self.u: F = None
        self.p: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: H = None
        self.s: A = None
        self.p: B = None
        self.v: C = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: F = None
        self.r: H = None
        self.txt = txt

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

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