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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.z: D = None
        self.t: I = None
        self.v: A = None
        self.u: E = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: C = None
        self.u: I = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: B = None
        self.y: E = None
        self.x: G = None
        self.q: E = None
        self.u: E = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.z: D = None
        self.t: I = None
        self.v: A = None
        self.u: E = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: C = None
        self.u: I = None
        self.r: G = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: B = None
        self.y: E = None
        self.x: G = None
        self.q: E = None
        self.u: E = None
        self.w: G = None
        self.txt = txt

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

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

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

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

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