class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: E = None
        self.s: J = None
        self.x: B = None
        self.r: G = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: H = None
        self.v: B = None
        self.w: J = None
        self.r: E = None
        self.x: J = None
        self.o: H = None
        self.u: B = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: I = None
        self.y: G = None
        self.s: H = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: G = None
        self.x: E = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.t: C = None
        self.x: C = None
        self.w: C = None
        self.r: I = None
        self.s: B = None
        self.txt = txt

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

d.z = h
d.v = b
d.s = a
d.x = n
d.r = g
d.q = k
n.w = h
n.q = h
n.p = k
n.v = k
n.s = b
n.r = b
n.z = g
n.y = g
n.t = d
n.x = m
e.p = a
e.w = a
e.x = a
e.y = l
e.o = l
e.q = l
e.v = n
e.u = n
e.r = b
m.q = e
m.x = l
m.w = g
b.r = e
b.t = h
b.y = g
b.s = l
b.v = k
k.w = g
k.o = g
k.s = n
g.z = n
l.u = a
l.t = g
l.y = g
l.x = b
h.t = k
a.p = e
a.t = e
a.x = e
a.w = e
a.v = d
a.r = h
a.s = n
assert b.v.w.z.s.r.r.y.txt == "
class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.v: E = None
        self.s: J = None
        self.x: B = None
        self.r: G = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: J = None
        self.y: H = None
        self.v: B = None
        self.w: J = None
        self.r: E = None
        self.x: J = None
        self.o: H = None
        self.u: B = None
        self.q: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: C = None
        self.x: H = None
        self.w: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: C = None
        self.t: I = None
        self.y: G = None
        self.s: H = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.t: G = None
        self.x: E = None
        self.y: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: C = None
        self.v: A = None
        self.t: C = None
        self.x: C = None
        self.w: C = None
        self.r: I = None
        self.s: B = None
        self.txt = txt

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

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