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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.w: H = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.q: C = None
        self.t: G = None
        self.v: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.q: A = None
        self.w: H = None
        self.s: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: C = None
        self.s: A = None
        self.q: C = None
        self.t: G = None
        self.v: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.u: C = None
        self.z: E = None
        self.txt = txt

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

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