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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: J = None
        self.u: I = None
        self.y: A = None
        self.o: E = None
        self.t: F = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: I = None
        self.z: I = None
        self.x: I = None
        self.p: G = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: H = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: F = None
        self.x: D = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: D = None
        self.u: G = None
        self.t: A = None
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.u: A = None
        self.r: F = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: B = None
        self.txt = txt

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

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

k.t = j
k.y = j
k.u = a
k.r = m
k.z = m
k.s = m
k.v = n
k.o = e
k.x = l
k.p = d
j.z = e
j.p = n
j.u = f
j.y = k
j.o = c
j.t = d
j.q = d
l.w = a
l.v = f
l.z = f
l.x = f
l.p = e
l.y = c
a.x = c
a.t = m
a.o = n
c.z = l
c.t = d
c.x = a
c.w = m
d.s = e
d.u = e
d.y = a
d.t = k
d.z = c
e.v = c
e.q = l
m.q = k
m.u = k
m.v = e
m.r = d
m.z = f
f.w = m
f.x = j
n.r = e
n.v = f
n.s = c
n.x = k
n.t = l
assert f.x.o.z.w.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: D = None
        self.r: H = None
        self.v: J = None
        self.y: B = None
        self.z: H = None
        self.o: G = None
        self.s: H = None
        self.x: C = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.p: J = None
        self.u: I = None
        self.y: A = None
        self.o: E = None
        self.t: F = None
        self.q: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.v: I = None
        self.z: I = None
        self.x: I = None
        self.p: G = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: E = None
        self.t: H = None
        self.o: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: F = None
        self.x: D = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: D = None
        self.u: G = None
        self.t: A = None
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: G = None
        self.u: A = None
        self.r: F = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.x: B = None
        self.txt = txt

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

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

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