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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.x: G = None
        self.q: A = None
        self.z: F = None
        self.s: J = None
        self.u: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: J = None
        self.w: H = None
        self.v: D = None
        self.o: E = None
        self.u: B = None
        self.s: A = None
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: E = None
        self.q: I = None
        self.w: F = None
        self.v: J = None
        self.t: A = None
        self.p: H = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: D = None
        self.r: J = None
        self.w: D = None
        self.x: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.x: G = None
        self.q: A = None
        self.z: F = None
        self.s: J = None
        self.u: G = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: G = None
        self.p: J = None
        self.w: H = None
        self.v: D = None
        self.o: E = None
        self.u: B = None
        self.s: A = None
        self.z: J = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: B = None
        self.s: E = None
        self.q: I = None
        self.w: F = None
        self.v: J = None
        self.t: A = None
        self.p: H = None
        self.z: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.z: D = None
        self.r: J = None
        self.w: D = None
        self.x: F = None
        self.txt = txt

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

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

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

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