class A:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: B = None
        self.z: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.u: B = None
        self.r: D = None
        self.q: F = None
        self.p: B = None
        self.txt = txt

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

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

a = A("a")
f = B("f")
g = C("g")
k = D("k")
d = E("d")
j = F("j")
e = D("e")
m = F("m")
i = E("i")
l = A("l")

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

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

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

class D:
    def __init__(self, txt: str):
        self.x: D = None
        self.z: D = None
        self.u: B = None
        self.r: D = None
        self.q: F = None
        self.p: B = None
        self.txt = txt

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

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

a = A("a")
f = B("f")
g = C("g")
k = D("k")
d = E("d")
j = F("j")
e = D("e")
m = F("m")
i = E("i")
l = A("l")

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