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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: I = None
        self.v: I = None
        self.p: F = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: H = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: F = None
        self.u: G = None
        self.w: B = None
        self.t: C = None
        self.x: C = None
        self.q: H = None
        self.y: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: A = None
        self.v: E = None
        self.q: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.o: I = None
        self.v: I = None
        self.p: F = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.t: I = None
        self.o: H = None
        self.w: F = None
        self.v: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.z: F = None
        self.u: G = None
        self.w: B = None
        self.t: C = None
        self.x: C = None
        self.q: H = None
        self.y: G = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.w: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: A = None
        self.v: E = None
        self.q: I = None
        self.txt = txt

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

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