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

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.v: H = None
        self.q: G = None
        self.s: F = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: H = None
        self.r: G = None
        self.q: B = None
        self.y: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.o: A = None
        self.s: E = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: B = None
        self.x: D = None
        self.u: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: G = None
        self.x: F = None
        self.v: H = None
        self.q: G = None
        self.s: F = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: H = None
        self.r: G = None
        self.q: B = None
        self.y: A = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.t: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.o: A = None
        self.s: E = None
        self.v: G = None
        self.q: G = None
        self.txt = txt

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

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

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