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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: H = None
        self.q: E = None
        self.r: D = None
        self.v: D = None
        self.o: D = None
        self.z: D = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: H = None
        self.q: E = None
        self.r: D = None
        self.v: D = None
        self.o: D = None
        self.z: D = None
        self.w: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.s: J = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: B = None
        self.z: E = None
        self.txt = txt

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

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