class A:
    def __init__(self, txt: str):
        self.p: E = None
        self.s: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: A = None
        self.x: J = None
        self.q: D = None
        self.o: E = None
        self.p: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: J = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: B = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: I = None
        self.p: E = None
        self.u: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: A = None
        self.x: J = None
        self.q: D = None
        self.o: E = None
        self.p: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: J = None
        self.u: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: I = None
        self.u: B = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: H = None
        self.u: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: A = None
        self.v: I = None
        self.p: E = None
        self.u: D = None
        self.txt = txt

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

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

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

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