class A:
    def __init__(self, txt: str):
        self.o: G = None
        self.q: C = None
        self.w: D = None
        self.p: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: G = None
        self.s: I = None
        self.o: C = None
        self.p: H = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: F = None
        self.r: F = None
        self.u: B = None
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: A = None
        self.w: A = None
        self.x: E = None
        self.z: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: E = None
        self.u: A = None
        self.z: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: D = None
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: G = None
        self.s: I = None
        self.o: C = None
        self.p: H = None
        self.v: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: F = None
        self.r: F = None
        self.u: B = None
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.p: A = None
        self.w: A = None
        self.x: E = None
        self.z: F = None
        self.txt = txt

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

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