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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: I = None
        self.s: G = None
        self.x: F = None
        self.r: G = None
        self.z: G = None
        self.u: G = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: E = None
        self.u: H = None
        self.w: C = None
        self.z: I = None
        self.y: I = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: F = None
        self.q: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: I = None
        self.s: G = None
        self.x: F = None
        self.r: G = None
        self.z: G = None
        self.u: G = None
        self.t: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: F = None
        self.t: E = None
        self.u: H = None
        self.w: C = None
        self.z: I = None
        self.y: I = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.x: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.p: F = None
        self.q: D = None
        self.txt = txt

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

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