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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: C = None
        self.s: D = None
        self.t: F = None
        self.v: C = None
        self.x: G = None
        self.w: I = None
        self.u: B = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.t: F = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: C = None
        self.s: D = None
        self.t: F = None
        self.v: C = None
        self.x: G = None
        self.w: I = None
        self.u: B = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: F = None
        self.t: F = None
        self.z: A = None
        self.txt = txt

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

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