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

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

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

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

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

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

k = A("k")
d = B("d")
j = C("j")
h = D("h")
n = E("n")
e = F("e")
b = E("b")
l = E("l")
f = D("f")

k.z = d
k.x = e
d.z = j
d.x = j
d.o = k
d.v = k
d.p = l
j.w = h
j.s = f
j.q = f
j.o = e
h.r = j
h.o = d
h.q = d
h.z = e
n.v = k
n.t = j
n.u = l
e.q = f
b.v = k
b.t = j
b.u = n
l.v = k
l.t = j
l.u = b
f.r = j
f.o = d
f.q = d
f.z = e
assert d.z.o.q.r.o.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

k = A("k")
d = B("d")
j = C("j")
h = D("h")
n = E("n")
e = F("e")
b = E("b")
l = E("l")
f = D("f")

k.z = d
k.x = e
d.z = j
d.x = j
d.o = k
d.v = k
d.p = l
j.w = h
j.s = f
j.q = f
j.o = e
h.r = j
h.o = d
h.q = d
h.z = e
n.v = k
n.t = j
n.u = l
e.q = f
b.v = k
b.t = j
b.u = n
l.v = k
l.t = j
l.u = b
f.r = j
f.o = d
f.q = d
f.z = e
assert d.z.o.q.r.o.q.z.txt == "e"