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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: F = None
        self.v: D = None
        self.s: C = None
        self.u: I = None
        self.r: A = None
        self.x: A = None
        self.q: G = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: H = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: A = None
        self.x: C = None
        self.z: H = None
        self.p: D = None
        self.o: B = None
        self.w: D = None
        self.q: E = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: G = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: F = None
        self.v: D = None
        self.s: C = None
        self.u: I = None
        self.r: A = None
        self.x: A = None
        self.q: G = None
        self.o: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.p: H = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: A = None
        self.x: C = None
        self.z: H = None
        self.p: D = None
        self.o: B = None
        self.w: D = None
        self.q: E = None
        self.t: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: G = None
        self.t: E = None
        self.txt = txt

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

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