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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: H = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: H = None
        self.z: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.u: C = None
        self.o: B = None
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: D = None
        self.u: E = None
        self.txt = txt

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

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

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