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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: C = None
        self.t: C = None
        self.v: J = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: I = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: H = None
        self.t: J = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: B = None
        self.v: C = None
        self.s: I = None
        self.z: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.o: C = None
        self.t: C = None
        self.v: J = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.w: I = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: H = None
        self.t: J = None
        self.s: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.t: C = None
        self.r: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.u: B = None
        self.v: C = None
        self.s: I = None
        self.z: C = None
        self.txt = txt

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

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