class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.s: F = None
        self.o: F = None
        self.v: G = None
        self.p: D = None
        self.y: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: E = None
        self.w: F = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: B = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: I = None
        self.p: A = None
        self.t: J = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: F = None
        self.r: E = None
        self.y: F = None
        self.p: B = None
        self.w: D = None
        self.u: A = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.x: A = None
        self.o: H = None
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: F = None
        self.s: F = None
        self.o: F = None
        self.v: G = None
        self.p: D = None
        self.y: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: E = None
        self.w: F = None
        self.y: B = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: I = None
        self.z: B = None
        self.p: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.o: I = None
        self.p: A = None
        self.t: J = None
        self.w: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: G = None
        self.s: F = None
        self.r: E = None
        self.y: F = None
        self.p: B = None
        self.w: D = None
        self.u: A = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: D = None
        self.y: B = None
        self.x: A = None
        self.o: H = None
        self.t: B = None
        self.txt = txt

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

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