class A:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: F = None
        self.v: B = None
        self.z: G = None
        self.s: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: I = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: I = None
        self.v: F = None
        self.o: C = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: I = None
        self.p: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.q: G = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: I = None
        self.v: F = None
        self.o: C = None
        self.x: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: H = None
        self.txt = txt

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

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