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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: C = None
        self.o: F = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: B = None
        self.x: D = None
        self.w: D = None
        self.u: A = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: E = None
        self.s: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: B = None
        self.w: B = None
        self.t: E = None
        self.y: B = None
        self.o: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: C = None
        self.o: F = None
        self.z: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: B = None
        self.x: D = None
        self.w: D = None
        self.u: A = None
        self.t: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: E = None
        self.s: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.q: B = None
        self.w: B = None
        self.t: E = None
        self.y: B = None
        self.o: C = None
        self.txt = txt

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

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