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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.x: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.s: F = None
        self.v: D = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.s: C = None
        self.x: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: D = None
        self.s: F = None
        self.v: D = None
        self.o: I = None
        self.txt = txt

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

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

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

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