class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.q: E = None
        self.r: G = None
        self.u: H = None
        self.x: H = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: A = None
        self.p: D = None
        self.w: D = None
        self.u: C = None
        self.z: F = None
        self.x: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.o: E = None
        self.q: E = None
        self.r: G = None
        self.u: H = None
        self.x: H = None
        self.s: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: G = None
        self.r: A = None
        self.w: G = None
        self.u: A = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.o: A = None
        self.p: D = None
        self.w: D = None
        self.u: C = None
        self.z: F = None
        self.x: E = None
        self.txt = txt

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

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