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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.x: G = None
        self.z: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: A = None
        self.u: C = None
        self.t: A = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: C = None
        self.r: D = None
        self.t: C = None
        self.u: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.y: C = None
        self.x: G = None
        self.z: I = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: A = None
        self.u: C = None
        self.t: A = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: C = None
        self.r: D = None
        self.t: C = None
        self.u: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

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

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