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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.w: F = None
        self.o: B = None
        self.s: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: E = None
        self.p: B = None
        self.y: A = None
        self.s: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: B = None
        self.w: F = None
        self.o: B = None
        self.s: E = None
        self.x: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.q: E = None
        self.p: B = None
        self.y: A = None
        self.s: B = None
        self.txt = txt

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

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

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