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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: F = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: F = None
        self.s: H = None
        self.q: A = None
        self.o: I = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: B = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.r: F = None
        self.q: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: I = None
        self.z: F = None
        self.s: H = None
        self.q: A = None
        self.o: I = None
        self.r: C = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: B = None
        self.u: D = None
        self.q: F = None
        self.txt = txt

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

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