class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: G = None
        self.z: G = None
        self.s: H = None
        self.o: H = None
        self.v: I = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: G = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: F = None
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.v: F = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.u: E = None
        self.z: A = None
        self.txt = txt

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

e.x = b
e.t = b
e.u = i
e.z = i
e.s = d
e.o = d
e.v = l
n.x = i
n.w = m
h.p = b
h.t = i
h.w = m
b.u = l
b.s = d
b.y = k
b.w = n
b.p = h
b.q = j
j.t = l
j.z = k
j.v = n
j.y = e
k.v = e
k.o = b
k.r = j
k.u = l
k.q = n
k.y = d
k.x = d
i.o = d
d.r = k
d.v = k
d.o = e
d.u = b
d.s = j
l.w = i
l.r = m
l.u = j
l.z = e
m.v = e
m.o = b
m.r = j
m.u = l
m.q = n
m.y = d
m.x = d
assert m.y.o.s.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: G = None
        self.z: G = None
        self.s: H = None
        self.o: H = None
        self.v: I = None
        self.t: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: G = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.z: F = None
        self.v: B = None
        self.y: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: A = None
        self.v: F = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: G = None
        self.r: F = None
        self.u: E = None
        self.z: A = None
        self.txt = txt

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

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