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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: B = None
        self.q: I = None
        self.t: F = None
        self.x: G = None
        self.v: F = None
        self.r: I = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: I = None
        self.v: I = None
        self.u: B = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: E = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: B = None
        self.v: H = None
        self.o: C = None
        self.r: D = None
        self.y: B = None
        self.w: I = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: B = None
        self.q: I = None
        self.t: F = None
        self.x: G = None
        self.v: F = None
        self.r: I = None
        self.s: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: I = None
        self.o: I = None
        self.v: I = None
        self.u: B = None
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: H = None
        self.q: E = None
        self.p: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.z: B = None
        self.v: H = None
        self.o: C = None
        self.r: D = None
        self.y: B = None
        self.w: I = None
        self.txt = txt

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

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

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

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