class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.q: J = None
        self.z: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: A = None
        self.o: H = None
        self.p: I = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.x: H = None
        self.u: H = None
        self.o: C = None
        self.y: B = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.u: G = None
        self.z: J = None
        self.r: C = None
        self.s: J = None
        self.y: E = None
        self.t: C = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: A = None
        self.o: H = None
        self.p: I = None
        self.s: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.q: B = None
        self.x: H = None
        self.u: H = None
        self.o: C = None
        self.y: B = None
        self.s: A = None
        self.z: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: G = None
        self.q: E = None
        self.u: G = None
        self.z: J = None
        self.r: C = None
        self.s: J = None
        self.y: E = None
        self.t: C = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.y: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: G = None
        self.p: A = None
        self.txt = txt

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

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