class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.z: D = None
        self.u: B = None
        self.s: H = None
        self.v: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: D = None
        self.v: F = None
        self.w: E = None
        self.z: D = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: A = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: A = None
        self.p: B = None
        self.o: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: H = None
        self.y: D = None
        self.v: F = None
        self.w: E = None
        self.z: D = None
        self.s: D = None
        self.t: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.p: A = None
        self.y: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: A = None
        self.p: B = None
        self.o: B = None
        self.txt = txt

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

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