class A:
    def __init__(self, txt: str):
        self.w: G = None
        self.z: J = None
        self.o: H = None
        self.y: F = None
        self.s: G = None
        self.r: F = None
        self.t: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: F = None
        self.x: F = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: H = None
        self.t: I = None
        self.y: I = None
        self.w: G = None
        self.o: H = None
        self.q: A = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.t: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: F = None
        self.x: F = None
        self.v: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: H = None
        self.x: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: E = None
        self.u: H = None
        self.t: I = None
        self.y: I = None
        self.w: G = None
        self.o: H = None
        self.q: A = None
        self.r: B = None
        self.v: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.u: A = None
        self.t: B = None
        self.txt = txt

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

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

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

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