class A:
    def __init__(self, txt: str):
        self.p: C = None
        self.x: I = None
        self.s: F = None
        self.y: E = None
        self.z: D = None
        self.r: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: G = None
        self.z: G = None
        self.y: B = None
        self.p: F = None
        self.q: D = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: E = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.x: D = None
        self.v: A = None
        self.s: E = None
        self.t: H = None
        self.q: I = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: H = None
        self.t: B = None
        self.p: E = None
        self.y: C = None
        self.z: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: G = None
        self.z: G = None
        self.y: B = None
        self.p: F = None
        self.q: D = None
        self.u: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: E = None
        self.q: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.x: D = None
        self.v: A = None
        self.s: E = None
        self.t: H = None
        self.q: I = None
        self.o: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: H = None
        self.t: B = None
        self.p: E = None
        self.y: C = None
        self.z: E = None
        self.txt = txt

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

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