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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.txt = txt

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

e = A("e")
b = B("b")
n = C("n")
h = D("h")
a = E("a")
i = F("i")
k = B("k")
g = E("g")

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: E = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: E = None
        self.x: E = None
        self.txt = txt

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

e = A("e")
b = B("b")
n = C("n")
h = D("h")
a = E("a")
i = F("i")
k = B("k")
g = E("g")

e.z = a
e.s = a
e.x = h
b.s = e
b.p = e
b.v = i
b.z = i
b.o = g
b.w = n
n.v = e
n.x = g
n.o = a
h.r = i
h.x = i
a.o = g
a.x = g
i.p = n
i.o = n
i.r = g
i.x = g
i.y = e
i.s = h
k.s = e
k.p = e
k.v = i
k.z = i
k.o = g
k.w = n
g.o = a
g.x = a
assert n.o.x.x.o.o.o.txt == "g"