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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: E = None
        self.r: H = None
        self.t: E = None
        self.w: C = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: G = None
        self.x: G = None
        self.r: D = None
        self.o: E = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: E = None
        self.s: A = None
        self.u: B = None
        self.t: D = None
        self.q: E = None
        self.y: D = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.z: E = None
        self.r: H = None
        self.t: E = None
        self.w: C = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.s: G = None
        self.x: G = None
        self.r: D = None
        self.o: E = None
        self.z: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: H = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: E = None
        self.s: A = None
        self.u: B = None
        self.t: D = None
        self.q: E = None
        self.y: D = None
        self.o: G = None
        self.txt = txt

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

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

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

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