class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: F = None
        self.s: B = None
        self.x: G = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: A = None
        self.p: E = None
        self.x: C = None
        self.r: H = None
        self.z: E = None
        self.u: F = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: H = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.v: A = None
        self.p: E = None
        self.x: C = None
        self.r: H = None
        self.z: E = None
        self.u: F = None
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.y: B = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: H = None
        self.w: D = None
        self.r: C = None
        self.txt = txt

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

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