class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: B = None
        self.o: H = None
        self.z: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: A = None
        self.o: J = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

e = A("e")
c = B("c")
j = C("j")
i = D("i")
m = E("m")
k = F("k")
n = G("n")
h = H("h")
f = I("f")
g = J("g")

e.u = k
e.q = c
e.o = h
e.z = g
c.u = i
c.y = j
j.p = k
j.t = e
j.o = g
j.z = i
i.w = k
i.r = m
i.o = e
i.p = e
i.v = e
i.y = e
i.t = c
i.x = c
i.u = n
i.z = g
m.r = j
k.p = c
k.q = c
k.t = g
n.y = e
n.r = k
h.z = c
h.p = m
f.o = e
f.v = e
f.t = g
f.s = k
f.w = c
f.p = m
g.p = m
assert n.r.q.u.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: B = None
        self.o: H = None
        self.z: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: D = None
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: A = None
        self.o: J = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: E = None
        self.txt = txt

e = A("e")
c = B("c")
j = C("j")
i = D("i")
m = E("m")
k = F("k")
n = G("n")
h = H("h")
f = I("f")
g = J("g")

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