class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: F = None
        self.x: F = None
        self.s: I = None
        self.z: B = None
        self.o: B = None
        self.t: I = None
        self.w: G = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: E = None
        self.r: C = None
        self.v: C = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.o: G = None
        self.y: I = None
        self.z: G = None
        self.q: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: C = None
        self.o: C = None
        self.y: D = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.t: E = None
        self.r: C = None
        self.v: C = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.v: D = None
        self.o: G = None
        self.y: I = None
        self.z: G = None
        self.q: I = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: C = None
        self.x: C = None
        self.o: C = None
        self.y: D = None
        self.q: F = None
        self.txt = txt

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

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