class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: H = None
        self.z: D = None
        self.t: J = None
        self.w: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: I = None
        self.t: E = None
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: F = None
        self.r: J = None
        self.z: F = None
        self.s: J = None
        self.q: C = None
        self.p: A = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: J = None
        self.w: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.r: H = None
        self.z: D = None
        self.t: J = None
        self.w: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: I = None
        self.t: E = None
        self.u: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.o: F = None
        self.r: J = None
        self.z: F = None
        self.s: J = None
        self.q: C = None
        self.p: A = None
        self.v: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.o: J = None
        self.w: B = None
        self.txt = txt

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

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

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