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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: C = None
        self.u: C = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.v: C = None
        self.u: C = None
        self.txt = txt

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

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

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

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