class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.x: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: E = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: C = None
        self.r: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: E = None
        self.u: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: D = None
        self.s: C = None
        self.r: B = None
        self.txt = txt

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

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

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