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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: I = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.z: C = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: I = None
        self.y: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: A = None
        self.r: F = None
        self.s: B = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

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

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