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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.t: E = None
        self.v: B = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: H = None
        self.t: G = None
        self.o: H = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: I = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: G = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: B = None
        self.t: E = None
        self.v: B = None
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: H = None
        self.t: G = None
        self.o: H = None
        self.y: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: I = None
        self.v: C = None
        self.o: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.q: G = None
        self.t: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: D = None
        self.t: C = None
        self.txt = txt

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

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