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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: G = None
        self.t: C = None
        self.p: C = None
        self.z: F = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: E = None
        self.u: C = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: H = None
        self.y: I = None
        self.w: B = None
        self.q: E = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: G = None
        self.x: G = None
        self.v: B = None
        self.u: F = None
        self.q: A = None
        self.p: G = None
        self.r: C = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: F = None
        self.y: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: C = None
        self.w: G = None
        self.t: C = None
        self.p: C = None
        self.z: F = None
        self.o: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: E = None
        self.u: C = None
        self.o: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.p: H = None
        self.y: I = None
        self.w: B = None
        self.q: E = None
        self.z: D = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: G = None
        self.x: G = None
        self.v: B = None
        self.u: F = None
        self.q: A = None
        self.p: G = None
        self.r: C = None
        self.z: C = None
        self.txt = txt

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

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

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