class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: F = None
        self.t: E = None
        self.r: F = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: G = None
        self.s: C = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.p: C = None
        self.o: E = None
        self.v: A = None
        self.t: C = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: B = None
        self.txt = txt

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

j.y = i
k.u = a
k.x = g
k.r = g
k.t = f
k.s = b
i.w = a
h.y = b
h.x = b
h.s = i
h.u = j
f.y = j
f.w = j
f.o = j
f.x = k
f.q = h
f.v = i
f.s = a
g.q = b
g.x = k
g.p = i
g.t = i
g.o = f
g.v = j
g.y = a
b.o = a
b.q = f
a.v = f
a.x = k
assert h.u.y.w.x.s.txt == "
class A:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.x: F = None
        self.t: E = None
        self.r: F = None
        self.s: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: G = None
        self.x: G = None
        self.s: C = None
        self.u: A = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: B = None
        self.p: C = None
        self.o: E = None
        self.v: A = None
        self.t: C = None
        self.y: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: B = None
        self.txt = txt

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

j.y = i
k.u = a
k.x = g
k.r = g
k.t = f
k.s = b
i.w = a
h.y = b
h.x = b
h.s = i
h.u = j
f.y = j
f.w = j
f.o = j
f.x = k
f.q = h
f.v = i
f.s = a
g.q = b
g.x = k
g.p = i
g.t = i
g.o = f
g.v = j
g.y = a
b.o = a
b.q = f
a.v = f
a.x = k
assert h.u.y.w.x.s.txt == "b"