class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.y: J = None
        self.p: C = None
        self.u: B = None
        self.t: H = None
        self.x: F = None
        self.r: H = None
        self.s: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: I = None
        self.p: F = None
        self.z: J = None
        self.q: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.v: I = None
        self.p: F = None
        self.z: J = None
        self.q: A = None
        self.txt = txt

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

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

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

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