class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: E = None
        self.u: D = None
        self.w: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: B = None
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: B = None
        self.p: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.x: G = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: E = None
        self.y: D = None
        self.t: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: B = None
        self.p: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: E = None
        self.o: B = None
        self.p: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.w: E = None
        self.t: E = None
        self.x: G = None
        self.s: B = None
        self.v: G = None
        self.txt = txt

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

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