class A:
    def __init__(self, txt: str):
        self.y: G = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: C = None
        self.q: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.s: F = None
        self.z: E = None
        self.y: I = None
        self.o: E = None
        self.p: B = None
        self.t: B = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: I = None
        self.t: I = None
        self.y: A = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.q: G = None
        self.z: G = None
        self.t: G = None
        self.r: H = None
        self.u: C = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.y: E = None
        self.s: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.v: C = None
        self.q: E = None
        self.o: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: C = None
        self.t: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: D = None
        self.u: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: F = None
        self.s: F = None
        self.z: E = None
        self.y: I = None
        self.o: E = None
        self.p: B = None
        self.t: B = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: I = None
        self.t: I = None
        self.y: A = None
        self.z: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: C = None
        self.q: G = None
        self.z: G = None
        self.t: G = None
        self.r: H = None
        self.u: C = None
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: C = None
        self.y: E = None
        self.s: H = None
        self.txt = txt

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

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