class A:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: F = None
        self.x: D = None
        self.t: F = None
        self.v: C = None
        self.u: C = None
        self.o: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.v: A = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: E = None
        self.t: H = None
        self.w: G = None
        self.o: F = None
        self.r: H = None
        self.v: G = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: B = None
        self.s: F = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: H = None
        self.s: D = None
        self.y: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.r: H = None
        self.x: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.t: B = None
        self.v: A = None
        self.w: A = None
        self.x: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: E = None
        self.t: H = None
        self.w: G = None
        self.o: F = None
        self.r: H = None
        self.v: G = None
        self.x: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.r: B = None
        self.s: F = None
        self.y: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: H = None
        self.s: D = None
        self.y: G = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.p: F = None
        self.r: H = None
        self.x: B = None
        self.txt = txt

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

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