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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: F = None
        self.t: A = None
        self.z: E = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: A = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.t: B = None
        self.z: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: F = None
        self.t: A = None
        self.z: E = None
        self.w: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.y: A = None
        self.x: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: D = None
        self.u: C = None
        self.t: B = None
        self.z: E = None
        self.w: A = None
        self.txt = txt

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

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

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

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

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