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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.r: F = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: F = None
        self.o: B = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: B = None
        self.o: C = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.v: E = None
        self.y: G = None
        self.r: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: D = None
        self.r: F = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.r: F = None
        self.o: B = None
        self.s: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: B = None
        self.o: C = None
        self.y: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: G = None
        self.v: E = None
        self.y: G = None
        self.r: D = None
        self.txt = txt

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

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

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