class A:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: C = None
        self.q: E = None
        self.r: E = None
        self.p: G = None
        self.x: E = None
        self.v: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: C = None
        self.r: B = None
        self.t: D = None
        self.v: E = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: G = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
k = C("k")
i = D("i")
j = E("j")
l = F("l")
g = G("g")
b = B("b")
f = D("f")
d = D("d")

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.p: C = None
        self.r: B = None
        self.t: D = None
        self.v: E = None
        self.q: A = None
        self.w: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: D = None
        self.w: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.y: G = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
k = C("k")
i = D("i")
j = E("j")
l = F("l")
g = G("g")
b = B("b")
f = D("f")
d = D("d")

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