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

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.z: E = None
        self.w: B = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: G = None
        self.s: E = None
        self.x: C = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

i.u = e
i.y = j
j.t = g
a.u = i
a.v = i
a.z = h
a.w = j
a.r = g
d.r = m
d.v = e
d.s = h
d.x = a
d.t = i
h.r = a
h.x = a
h.t = a
h.u = a
h.w = m
h.p = i
h.y = i
g.y = a
e.o = i
e.z = a
e.q = j
m.x = g
m.r = a
m.p = a
m.u = h
assert d.v.o.u.txt == "
class A:
    def __init__(self, txt: str):
        self.u: G = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: A = None
        self.z: E = None
        self.w: B = None
        self.r: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: G = None
        self.s: E = None
        self.x: C = None
        self.t: A = None
        self.txt = txt

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

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

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

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

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

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