class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.x: A = None
        self.t: D = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: F = None
        self.p: F = None
        self.q: B = None
        self.s: A = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: D = None
        self.x: A = None
        self.t: D = None
        self.p: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: F = None
        self.p: F = None
        self.q: B = None
        self.s: A = None
        self.o: E = None
        self.z: F = None
        self.txt = txt

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

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