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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.s: C = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.x: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.v: G = None
        self.s: C = None
        self.txt = txt

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

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

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