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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: F = None
        self.x: F = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: A = None
        self.u: A = None
        self.o: E = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: E = None
        self.q: A = None
        self.u: A = None
        self.x: H = None
        self.z: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.t: F = None
        self.x: F = None
        self.q: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: A = None
        self.u: A = None
        self.o: E = None
        self.s: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: E = None
        self.q: A = None
        self.u: A = None
        self.x: H = None
        self.z: C = None
        self.txt = txt

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

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

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

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