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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: D = None
        self.s: D = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.t: A = None
        self.v: A = None
        self.o: C = None
        self.p: B = None
        self.y: H = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.u: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.u: D = None
        self.s: D = None
        self.x: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.x: B = None
        self.q: H = None
        self.t: A = None
        self.v: A = None
        self.o: C = None
        self.p: B = None
        self.y: H = None
        self.txt = txt

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

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