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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: F = None
        self.p: F = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.s: F = None
        self.p: F = None
        self.txt = txt

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

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

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

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