class A:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: B = None
        self.u: D = None
        self.r: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: F = None
        self.r: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: A = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

j = A("j")
c = B("c")
k = C("k")
d = D("d")
i = E("i")
g = F("g")
e = G("e")
b = H("b")
l = I("l")
m = J("m")

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: F = None
        self.r: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.u: G = None
        self.r: A = None
        self.z: D = None
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: D = None
        self.txt = txt

j = A("j")
c = B("c")
k = C("k")
d = D("d")
i = E("i")
g = F("g")
e = G("e")
b = H("b")
l = I("l")
m = J("m")

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