class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: J = None
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: J = None
        self.v: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: A = None
        self.q: E = None
        self.p: A = None
        self.v: C = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: I = None
        self.u: J = None
        self.v: G = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: I = None
        self.o: A = None
        self.q: E = None
        self.p: A = None
        self.v: C = None
        self.txt = txt

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

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

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

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