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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: F = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: F = None
        self.v: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.v: D = None
        self.txt = txt

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

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

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