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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: H = None
        self.y: H = None
        self.w: A = None
        self.p: A = None
        self.o: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.t: H = None
        self.y: H = None
        self.w: A = None
        self.p: A = None
        self.o: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.txt = txt

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

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

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