class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: C = None
        self.u: B = None
        self.o: D = None
        self.q: D = None
        self.w: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: C = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: H = None
        self.q: D = None
        self.v: H = None
        self.o: D = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: E = None
        self.z: C = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.t: C = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: A = None
        self.x: H = None
        self.q: D = None
        self.v: H = None
        self.o: D = None
        self.t: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: E = None
        self.z: C = None
        self.r: B = None
        self.txt = txt

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

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

j.z = d
j.o = d
j.q = d
j.v = k
j.w = k
j.u = i
i.q = c
i.t = f
k.z = a
k.s = a
d.q = k
d.v = f
a.q = f
a.t = k
a.x = e
e.r = a
e.u = f
g.p = j
g.t = j
g.x = f
g.v = f
g.q = d
g.o = d
f.q = n
f.o = a
f.z = k
f.r = i
n.q = i
n.x = i
n.s = i
n.p = i
n.v = e
n.r = e
n.z = j
n.o = g
n.w = f
c.p = j
c.t = j
c.x = f
c.v = f
c.q = d
c.o = d
assert d.v.q.p.t.r.t.txt == "f"