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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: E = None
        self.x: B = None
        self.s: H = None
        self.o: G = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: F = None
        self.y: B = None
        self.o: A = None
        self.u: A = None
        self.r: A = None
        self.x: H = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: D = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.o: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: E = None
        self.x: B = None
        self.s: H = None
        self.o: G = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: B = None
        self.s: F = None
        self.y: B = None
        self.o: A = None
        self.u: A = None
        self.r: A = None
        self.x: H = None
        self.p: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.v: D = None
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: H = None
        self.txt = txt

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

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

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

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