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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: I = None
        self.v: I = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: A = None
        self.y: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: F = None
        self.q: I = None
        self.v: I = None
        self.txt = txt

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

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