class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: B = None
        self.x: B = None
        self.s: A = None
        self.p: H = None
        self.q: G = None
        self.y: G = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: B = None
        self.r: I = None
        self.t: H = None
        self.w: B = None
        self.q: B = None
        self.y: H = None
        self.s: B = None
        self.p: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: B = None
        self.x: B = None
        self.s: A = None
        self.p: H = None
        self.q: G = None
        self.y: G = None
        self.o: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: B = None
        self.r: I = None
        self.t: H = None
        self.w: B = None
        self.q: B = None
        self.y: H = None
        self.s: B = None
        self.p: D = None
        self.txt = txt

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

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