class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.t: E = None
        self.y: G = None
        self.x: F = None
        self.z: C = None
        self.q: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: E = None
        self.v: G = None
        self.q: D = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: C = None
        self.t: B = None
        self.q: A = None
        self.p: B = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: H = None
        self.y: A = None
        self.o: D = None
        self.r: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: B = None
        self.s: D = None
        self.x: C = None
        self.w: B = None
        self.u: F = None
        self.v: E = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: E = None
        self.v: G = None
        self.q: D = None
        self.s: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: E = None
        self.v: H = None
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.r: C = None
        self.t: B = None
        self.q: A = None
        self.p: B = None
        self.v: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: H = None
        self.y: A = None
        self.o: D = None
        self.r: H = None
        self.x: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.y: B = None
        self.s: D = None
        self.x: C = None
        self.w: B = None
        self.u: F = None
        self.v: E = None
        self.txt = txt

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

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

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