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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: H = None
        self.x: C = None
        self.s: A = None
        self.u: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.u: A = None
        self.x: A = None
        self.w: B = None
        self.r: H = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: D = None
        self.z: G = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: E = None
        self.u: G = None
        self.z: E = None
        self.x: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.y: H = None
        self.x: C = None
        self.s: A = None
        self.u: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.y: G = None
        self.u: A = None
        self.x: A = None
        self.w: B = None
        self.r: H = None
        self.q: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: H = None
        self.y: D = None
        self.z: G = None
        self.u: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: E = None
        self.u: G = None
        self.z: E = None
        self.x: A = None
        self.txt = txt

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

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