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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.s: A = None
        self.t: C = None
        self.o: E = None
        self.p: A = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: E = None
        self.s: A = None
        self.t: C = None
        self.o: E = None
        self.p: A = None
        self.txt = txt

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

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