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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: E = None
        self.z: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: B = None
        self.v: F = None
        self.u: H = None
        self.p: D = None
        self.s: D = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.x: D = None
        self.z: H = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: E = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: E = None
        self.z: G = None
        self.u: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: C = None
        self.r: B = None
        self.v: F = None
        self.u: H = None
        self.p: D = None
        self.s: D = None
        self.q: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: C = None
        self.x: D = None
        self.z: H = None
        self.s: C = None
        self.txt = txt

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

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

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

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