class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: D = None
        self.r: B = None
        self.w: E = None
        self.p: E = None
        self.o: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: H = None
        self.z: F = None
        self.q: H = None
        self.v: H = None
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.t: E = None
        self.s: A = None
        self.u: J = None
        self.x: B = None
        self.r: G = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: I = None
        self.x: A = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: I = None
        self.s: I = None
        self.o: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: H = None
        self.z: F = None
        self.q: H = None
        self.v: H = None
        self.x: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.t: E = None
        self.s: A = None
        self.u: J = None
        self.x: B = None
        self.r: G = None
        self.q: F = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: I = None
        self.x: A = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: I = None
        self.s: I = None
        self.o: H = None
        self.txt = txt

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

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