class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.q: G = None
        self.t: E = None
        self.r: F = None
        self.w: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: D = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: I = None
        self.r: A = None
        self.s: G = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.x: B = None
        self.p: A = None
        self.u: D = None
        self.o: B = None
        self.z: B = None
        self.q: F = None
        self.v: I = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: C = None
        self.o: B = None
        self.x: D = None
        self.txt = txt

c = A("c")
e = B("e")
l = C("l")
m = D("m")
f = E("f")
i = F("i")
n = G("n")
g = H("g")
k = I("k")
b = J("b")

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.q: D = None
        self.z: A = None
        self.o: D = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.t: I = None
        self.r: A = None
        self.s: G = None
        self.y: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: D = None
        self.x: B = None
        self.p: A = None
        self.u: D = None
        self.o: B = None
        self.z: B = None
        self.q: F = None
        self.v: I = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: C = None
        self.o: B = None
        self.x: D = None
        self.txt = txt

c = A("c")
e = B("e")
l = C("l")
m = D("m")
f = E("f")
i = F("i")
n = G("n")
g = H("g")
k = I("k")
b = J("b")

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