class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.z: B = None
        self.p: E = None
        self.y: E = None
        self.q: E = None
        self.r: C = None
        self.s: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: H = None
        self.o: I = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: H = None
        self.o: I = None
        self.p: D = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.w: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

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

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

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