class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.t: H = None
        self.v: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: E = None
        self.s: B = None
        self.o: A = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: C = None
        self.q: G = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: I = None
        self.u: F = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: A = None
        self.u: E = None
        self.s: H = None
        self.q: B = None
        self.p: C = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: I = None
        self.u: E = None
        self.z: F = None
        self.w: G = None
        self.p: F = None
        self.t: A = None
        self.o: C = None
        self.v: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: H = None
        self.r: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: E = None
        self.s: B = None
        self.o: A = None
        self.v: B = None
        self.r: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: J = None
        self.p: C = None
        self.q: G = None
        self.x: J = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: I = None
        self.u: F = None
        self.q: D = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: C = None
        self.v: A = None
        self.u: E = None
        self.s: H = None
        self.q: B = None
        self.p: C = None
        self.y: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: I = None
        self.s: I = None
        self.u: E = None
        self.z: F = None
        self.w: G = None
        self.p: F = None
        self.t: A = None
        self.o: C = None
        self.v: J = None
        self.txt = txt

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

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

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

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