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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: E = None
        self.t: E = None
        self.r: G = None
        self.p: D = None
        self.o: B = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.s: F = None
        self.u: D = None
        self.t: C = None
        self.o: D = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: C = None
        self.v: D = None
        self.z: G = None
        self.q: C = None
        self.s: D = None
        self.u: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: E = None
        self.t: E = None
        self.r: G = None
        self.p: D = None
        self.o: B = None
        self.q: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.s: F = None
        self.u: D = None
        self.t: C = None
        self.o: D = None
        self.z: H = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.t: A = None
        self.r: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.w: C = None
        self.v: D = None
        self.z: G = None
        self.q: C = None
        self.s: D = None
        self.u: F = None
        self.txt = txt

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

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