class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.q: J = None
        self.r: H = None
        self.p: C = None
        self.z: C = None
        self.y: B = None
        self.x: E = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: I = None
        self.r: H = None
        self.s: I = None
        self.y: E = None
        self.w: D = None
        self.p: A = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: C = None
        self.z: I = None
        self.t: F = None
        self.w: B = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: C = None
        self.u: C = None
        self.s: C = None
        self.t: A = None
        self.w: D = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: C = None
        self.z: A = None
        self.v: C = None
        self.t: I = None
        self.o: A = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: I = None
        self.q: I = None
        self.r: H = None
        self.s: I = None
        self.y: E = None
        self.w: D = None
        self.p: A = None
        self.u: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.o: C = None
        self.z: I = None
        self.t: F = None
        self.w: B = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.o: C = None
        self.u: C = None
        self.s: C = None
        self.t: A = None
        self.w: D = None
        self.z: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: C = None
        self.z: A = None
        self.v: C = None
        self.t: I = None
        self.o: A = None
        self.txt = txt

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

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