class A:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: H = None
        self.q: E = None
        self.t: H = None
        self.r: G = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: A = None
        self.w: J = None
        self.q: H = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: A = None
        self.p: C = None
        self.w: G = None
        self.z: F = None
        self.r: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: I = None
        self.z: E = None
        self.s: B = None
        self.u: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: F = None
        self.o: C = None
        self.w: I = None
        self.z: J = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: G = None
        self.o: B = None
        self.x: B = None
        self.y: E = None
        self.v: J = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.u: J = None
        self.p: A = None
        self.w: J = None
        self.q: H = None
        self.o: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: C = None
        self.q: A = None
        self.p: C = None
        self.w: G = None
        self.z: F = None
        self.r: J = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: I = None
        self.z: E = None
        self.s: B = None
        self.u: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: E = None
        self.v: F = None
        self.o: C = None
        self.w: I = None
        self.z: J = None
        self.t: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: E = None
        self.w: G = None
        self.o: B = None
        self.x: B = None
        self.y: E = None
        self.v: J = None
        self.txt = txt

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

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

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