class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: D = None
        self.y: D = None
        self.q: H = None
        self.t: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: B = None
        self.w: J = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: A = None
        self.p: D = None
        self.u: F = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: H = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: D = None
        self.s: J = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: B = None
        self.w: J = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: I = None
        self.s: A = None
        self.p: D = None
        self.u: F = None
        self.r: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: H = None
        self.p: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.u: D = None
        self.r: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.t: D = None
        self.s: J = None
        self.txt = txt

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

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

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

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