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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: I = None
        self.u: G = None
        self.w: H = None
        self.t: G = None
        self.y: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: C = None
        self.o: E = None
        self.p: C = None
        self.t: I = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: I = None
        self.u: G = None
        self.w: H = None
        self.t: G = None
        self.y: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.r: C = None
        self.o: E = None
        self.p: C = None
        self.t: I = None
        self.txt = txt

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

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

n.u = e
n.p = c
l.w = k
l.o = e
c.q = n
d.z = i
d.w = i
d.q = g
d.y = g
d.u = b
d.t = b
k.u = d
k.r = d
k.x = d
k.s = e
k.o = e
k.t = e
k.p = e
k.z = n
k.y = i
e.t = l
e.y = g
b.w = e
i.q = n
i.r = c
i.p = c
i.o = k
i.t = g
g.q = l
g.o = b
assert k.z.u.t.o.y.o.w.txt == "e"