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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: A = None
        self.x: C = None
        self.y: E = None
        self.o: A = None
        self.w: A = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: A = None
        self.q: F = None
        self.r: C = None
        self.o: E = None
        self.z: C = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: A = None
        self.x: C = None
        self.y: E = None
        self.o: A = None
        self.w: A = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: F = None
        self.s: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.t: E = None
        self.w: A = None
        self.q: F = None
        self.r: C = None
        self.o: E = None
        self.z: C = None
        self.s: A = None
        self.txt = txt

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

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