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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: I = None
        self.w: F = None
        self.z: A = None
        self.x: F = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: J = None
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: D = None
        self.s: H = None
        self.y: I = None
        self.v: F = None
        self.r: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: I = None
        self.w: F = None
        self.z: A = None
        self.x: F = None
        self.v: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: E = None
        self.r: J = None
        self.x: G = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.u: D = None
        self.s: H = None
        self.y: I = None
        self.v: F = None
        self.r: I = None
        self.txt = txt

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

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