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

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

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: J = None
        self.u: D = None
        self.t: J = None
        self.q: A = None
        self.y: I = None
        self.w: F = None
        self.r: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: B = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: H = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: J = None
        self.z: J = None
        self.u: D = None
        self.t: J = None
        self.q: A = None
        self.y: I = None
        self.w: F = None
        self.r: A = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: B = None
        self.p: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: H = None
        self.w: H = None
        self.u: F = None
        self.txt = txt

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

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

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

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

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