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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: F = None
        self.v: C = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: B = None
        self.t: H = None
        self.q: F = None
        self.w: B = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: C = None
        self.x: B = None
        self.p: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: F = None
        self.v: C = None
        self.p: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: B = None
        self.t: H = None
        self.q: F = None
        self.w: B = None
        self.s: F = None
        self.r: F = None
        self.txt = txt

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

i.q = a
i.o = a
i.v = a
i.u = k
i.p = k
i.x = h
i.z = c
i.t = g
g.r = k
c.o = a
c.r = m
c.u = g
c.p = n
c.v = k
h.p = a
h.v = a
h.x = a
h.t = a
h.q = i
h.w = k
h.s = c
h.z = g
m.v = g
m.w = a
k.z = g
k.w = a
k.t = a
k.r = l
k.o = i
k.u = c
k.s = m
n.s = c
n.x = g
n.p = g
l.r = c
l.v = c
l.s = k
l.p = m
a.u = k
a.q = k
a.s = k
a.r = k
a.o = g
a.w = g
a.t = l
assert k.u.p.s.r.v.r.txt == "k"