class A:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: I = None
        self.p: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: C = None
        self.q: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: B = None
        self.o: C = None
        self.w: I = None
        self.t: A = None
        self.r: F = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: I = None
        self.s: C = None
        self.y: D = None
        self.w: A = None
        self.p: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: C = None
        self.q: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: B = None
        self.o: C = None
        self.w: I = None
        self.t: A = None
        self.r: F = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.q: I = None
        self.s: C = None
        self.y: D = None
        self.w: A = None
        self.p: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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