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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.u: I = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: A = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: C = None
        self.s: E = None
        self.o: G = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.p: F = None
        self.r: E = None
        self.x: A = None
        self.w: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.z: E = None
        self.u: I = None
        self.y: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.r: A = None
        self.q: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: C = None
        self.s: E = None
        self.o: G = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: C = None
        self.p: F = None
        self.r: E = None
        self.x: A = None
        self.w: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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