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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

h = A("h")
a = B("a")
l = C("l")
j = D("j")
m = E("m")
g = F("g")
b = G("b")
d = H("d")
k = G("k")

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.p: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

h = A("h")
a = B("a")
l = C("l")
j = D("j")
m = E("m")
g = F("g")
b = G("b")
d = H("d")
k = G("k")

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