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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: C = None
        self.o: E = None
        self.p: J = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.y: B = None
        self.z: A = None
        self.o: E = None
        self.t: F = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: H = None
        self.p: F = None
        self.w: J = None
        self.r: F = None
        self.o: H = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

i.v = a
i.p = g
i.y = g
i.w = m
i.o = m
i.r = n
i.t = b
i.q = b
i.x = d
b.q = i
b.y = n
b.o = f
b.p = g
b.z = c
n.x = b
n.r = b
n.y = b
n.z = i
n.p = i
n.o = f
n.t = h
d.z = i
d.v = b
d.r = g
f.q = g
f.w = g
f.x = c
f.o = c
f.p = h
f.r = h
f.y = m
h.z = f
h.q = n
h.v = d
m.x = h
m.r = h
m.z = g
m.p = g
m.q = n
m.o = d
m.v = d
c.x = a
c.p = i
c.s = n
c.r = g
c.w = h
c.z = b
c.u = b
c.y = m
c.t = m
c.q = f
a.q = c
a.x = c
a.p = g
a.o = g
a.y = n
a.s = b
a.t = i
a.w = d
g.z = f
g.o = n
g.s = b
g.x = b
g.y = d
g.u = a
assert h.v.z.q.p.y.r.txt == "
class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: J = None
        self.w: G = None
        self.r: C = None
        self.t: B = None
        self.y: J = None
        self.x: D = None
        self.q: B = None
        self.o: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.y: C = None
        self.o: E = None
        self.p: J = None
        self.z: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.y: B = None
        self.z: A = None
        self.o: E = None
        self.t: F = None
        self.p: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: A = None
        self.v: B = None
        self.r: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: J = None
        self.x: H = None
        self.p: F = None
        self.w: J = None
        self.r: F = None
        self.o: H = None
        self.y: G = None
        self.txt = txt

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

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

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

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

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

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

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