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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.r: I = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.q: E = None
        self.y: J = None
        self.r: E = None
        self.s: I = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.z: I = None
        self.x: D = None
        self.txt = txt

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

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

e = A("e")
d = B("d")
g = C("g")
a = D("a")
l = E("l")
h = F("h")
c = G("c")
j = H("j")
f = I("f")
b = J("b")

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

class B:
    def __init__(self, txt: str):
        self.o: E = None
        self.s: D = None
        self.r: I = None
        self.x: J = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: H = None
        self.q: E = None
        self.y: J = None
        self.r: E = None
        self.s: I = None
        self.v: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: G = None
        self.o: A = None
        self.z: I = None
        self.x: D = None
        self.txt = txt

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

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

e = A("e")
d = B("d")
g = C("g")
a = D("a")
l = E("l")
h = F("h")
c = G("c")
j = H("j")
f = I("f")
b = J("b")

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