class A:
    def __init__(self, txt: str):
        self.z: D = None
        self.x: E = None
        self.o: E = None
        self.w: B = None
        self.y: E = None
        self.q: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: F = None
        self.x: E = None
        self.r: A = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: F = None
        self.y: F = None
        self.x: E = None
        self.r: A = None
        self.z: B = None
        self.v: F = None
        self.txt = txt

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

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

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

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