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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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