class A:
    def __init__(self, txt: str):
        self.p: J = None
        self.v: B = None
        self.w: B = None
        self.q: C = None
        self.r: H = None
        self.u: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: C = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: I = None
        self.u: G = None
        self.x: D = None
        self.v: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: H = None
        self.o: F = None
        self.u: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: D = None
        self.q: C = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: I = None
        self.r: I = None
        self.u: G = None
        self.x: D = None
        self.v: E = None
        self.o: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.t: H = None
        self.o: F = None
        self.u: E = None
        self.r: A = None
        self.txt = txt

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

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

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