class A:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: D = None
        self.w: J = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: H = None
        self.t: B = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: G = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.q: F = None
        self.u: D = None
        self.w: J = None
        self.z: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.x: H = None
        self.t: B = None
        self.s: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: G = None
        self.txt = txt

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

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

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