class A:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: I = None
        self.q: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: A = None
        self.y: I = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: I = None
        self.r: C = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: D = None
        self.p: H = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: A = None
        self.x: F = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: A = None
        self.y: I = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: I = None
        self.r: C = None
        self.w: C = None
        self.t: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: D = None
        self.p: H = None
        self.y: A = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.v: A = None
        self.x: F = None
        self.t: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: B = None
        self.txt = txt

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

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