class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.x: C = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: H = None
        self.v: F = None
        self.s: I = None
        self.p: C = None
        self.x: E = None
        self.q: D = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: I = None
        self.o: A = None
        self.s: I = None
        self.z: A = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: E = None
        self.t: C = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: D = None
        self.o: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.y: H = None
        self.v: F = None
        self.s: I = None
        self.p: C = None
        self.x: E = None
        self.q: D = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: I = None
        self.o: A = None
        self.s: I = None
        self.z: A = None
        self.t: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.p: E = None
        self.t: C = None
        self.z: C = None
        self.w: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: C = None
        self.s: D = None
        self.o: C = None
        self.x: D = None
        self.txt = txt

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

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

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

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