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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: I = None
        self.r: I = None
        self.o: F = None
        self.z: A = None
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.x: I = None
        self.t: H = None
        self.z: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: B = None
        self.y: F = None
        self.q: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.u: I = None
        self.x: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.v: I = None
        self.r: I = None
        self.o: F = None
        self.z: A = None
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.s: F = None
        self.x: I = None
        self.t: H = None
        self.z: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: B = None
        self.y: F = None
        self.q: B = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.y: C = None
        self.q: C = None
        self.u: I = None
        self.x: F = None
        self.txt = txt

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

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