class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.s: G = None
        self.p: F = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: G = None
        self.x: J = None
        self.v: D = None
        self.y: I = None
        self.w: A = None
        self.s: I = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: E = None
        self.r: F = None
        self.o: J = None
        self.v: I = None
        self.x: J = None
        self.q: D = None
        self.w: I = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: G = None
        self.x: J = None
        self.v: D = None
        self.y: I = None
        self.w: A = None
        self.s: I = None
        self.z: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.p: G = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: E = None
        self.r: F = None
        self.o: J = None
        self.v: I = None
        self.x: J = None
        self.q: D = None
        self.w: I = None
        self.u: E = None
        self.txt = txt

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

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

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

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