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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: C = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: G = None
        self.v: C = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: H = None
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.w: C = None
        self.txt = txt

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

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