class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.s: F = None
        self.p: F = None
        self.x: C = None
        self.r: C = None
        self.z: C = None
        self.u: F = None
        self.t: F = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: C = None
        self.r: I = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: A = None
        self.o: G = None
        self.y: E = None
        self.r: I = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: I = None
        self.q: D = None
        self.t: H = None
        self.u: G = None
        self.z: B = None
        self.o: B = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: G = None
        self.u: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.v: G = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: C = None
        self.z: F = None
        self.s: H = None
        self.y: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: C = None
        self.r: I = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: I = None
        self.p: A = None
        self.o: G = None
        self.y: E = None
        self.r: I = None
        self.t: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: I = None
        self.q: D = None
        self.t: H = None
        self.u: G = None
        self.z: B = None
        self.o: B = None
        self.v: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.p: G = None
        self.u: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: D = None
        self.t: A = None
        self.v: G = None
        self.r: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: D = None
        self.o: C = None
        self.z: F = None
        self.s: H = None
        self.y: F = None
        self.txt = txt

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

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