class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.p: E = None
        self.v: H = None
        self.z: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: E = None
        self.t: B = None
        self.u: I = None
        self.o: E = None
        self.z: I = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: G = None
        self.p: C = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: C = None
        self.w: F = None
        self.o: D = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: I = None
        self.z: D = None
        self.v: H = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: G = None
        self.t: F = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: B = None
        self.y: A = None
        self.z: B = None
        self.o: G = None
        self.u: I = None
        self.w: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: E = None
        self.t: B = None
        self.u: I = None
        self.o: E = None
        self.z: I = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: G = None
        self.p: C = None
        self.y: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: C = None
        self.w: F = None
        self.o: D = None
        self.x: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.u: I = None
        self.z: D = None
        self.v: H = None
        self.w: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: G = None
        self.t: F = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: B = None
        self.y: A = None
        self.z: B = None
        self.o: G = None
        self.u: I = None
        self.w: H = None
        self.txt = txt

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

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