class A:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: D = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: G = None
        self.y: D = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: G = None
        self.w: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: J = None
        self.r: D = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: I = None
        self.p: G = None
        self.y: D = None
        self.x: B = None
        self.q: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: G = None
        self.w: G = None
        self.txt = txt

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

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