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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.u: F = None
        self.z: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: B = None
        self.u: F = None
        self.z: D = None
        self.q: D = None
        self.txt = txt

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

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

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

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

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