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

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: E = None
        self.y: A = None
        self.x: E = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: G = None
        self.q: D = None
        self.t: F = None
        self.x: B = None
        self.txt = txt

g = A("g")
i = B("i")
e = C("e")
d = D("d")
a = E("a")
l = F("l")
f = G("f")
m = H("m")
j = I("j")
n = B("n")

g.o = n
g.y = f
g.s = e
g.v = e
g.p = a
i.r = j
i.v = a
i.x = a
i.y = g
i.z = g
e.p = i
e.v = j
d.t = j
d.s = f
d.p = e
d.w = m
a.p = f
a.o = f
a.q = l
a.v = m
a.x = e
l.o = n
l.t = e
l.r = e
l.p = i
l.v = j
f.s = g
f.z = j
f.u = l
f.v = m
f.p = n
f.x = a
m.w = j
j.u = d
j.q = d
j.w = f
j.t = l
j.x = n
n.r = j
n.v = a
n.x = a
n.y = g
n.z = g
assert l.o.x.x.v.w.x.q.txt == "
class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: G = None
        self.s: C = None
        self.p: E = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: I = None
        self.v: E = None
        self.y: A = None
        self.x: E = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class I:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: G = None
        self.q: D = None
        self.t: F = None
        self.x: B = None
        self.txt = txt

g = A("g")
i = B("i")
e = C("e")
d = D("d")
a = E("a")
l = F("l")
f = G("f")
m = H("m")
j = I("j")
n = B("n")

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