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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.u: D = None
        self.t: F = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: A = None
        self.p: A = None
        self.txt = txt

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

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