class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.s: G = None
        self.u: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: C = None
        self.p: F = None
        self.t: A = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: B = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.x: C = None
        self.p: F = None
        self.t: A = None
        self.w: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.s: B = None
        self.r: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.txt = txt

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

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