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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: G = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.r: A = None
        self.q: B = None
        self.z: B = None
        self.t: E = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: A = None
        self.y: C = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.t: G = None
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.r: A = None
        self.q: B = None
        self.z: B = None
        self.t: E = None
        self.x: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: A = None
        self.y: C = None
        self.txt = txt

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

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

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