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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: A = None
        self.w: D = None
        self.z: A = None
        self.p: D = None
        self.y: E = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: E = None
        self.w: E = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: D = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: E = None
        self.w: B = None
        self.o: F = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: A = None
        self.w: D = None
        self.z: A = None
        self.p: D = None
        self.y: E = None
        self.o: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: E = None
        self.w: E = None
        self.v: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: D = None
        self.y: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: E = None
        self.w: B = None
        self.o: F = None
        self.z: D = None
        self.y: G = None
        self.txt = txt

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

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