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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: A = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: H = None
        self.s: I = None
        self.z: F = None
        self.w: J = None
        self.y: H = None
        self.o: B = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: A = None
        self.y: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: H = None
        self.s: I = None
        self.z: F = None
        self.w: J = None
        self.y: H = None
        self.o: B = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: G = None
        self.txt = txt

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

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

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