class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: E = None
        self.w: E = None
        self.u: H = None
        self.y: F = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: F = None
        self.s: E = None
        self.z: D = None
        self.w: E = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: E = None
        self.z: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: G = None
        self.q: F = None
        self.s: E = None
        self.z: D = None
        self.w: E = None
        self.p: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.p: E = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: C = None
        self.q: E = None
        self.z: B = None
        self.txt = txt

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

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

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

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