class A:
    def __init__(self, txt: str):
        self.s: F = None
        self.w: B = None
        self.y: I = None
        self.v: C = None
        self.p: G = None
        self.x: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: D = None
        self.x: G = None
        self.t: B = None
        self.o: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: I = None
        self.v: B = None
        self.p: E = None
        self.x: C = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.q: G = None
        self.w: D = None
        self.z: H = None
        self.y: H = None
        self.t: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.p: D = None
        self.x: G = None
        self.t: B = None
        self.o: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: B = None
        self.y: I = None
        self.v: B = None
        self.p: E = None
        self.x: C = None
        self.u: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: B = None
        self.q: G = None
        self.w: D = None
        self.z: H = None
        self.y: H = None
        self.t: G = None
        self.txt = txt

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

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