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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: C = None
        self.s: B = None
        self.y: B = None
        self.t: D = None
        self.w: B = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: C = None
        self.s: B = None
        self.y: B = None
        self.t: D = None
        self.w: B = None
        self.txt = txt

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

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

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