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

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

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

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

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

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

n = A("n")
m = B("m")
c = C("c")
h = D("h")
l = E("l")
d = F("d")
k = D("k")
i = F("i")
j = E("j")

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

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

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

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

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

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

n = A("n")
m = B("m")
c = C("c")
h = D("h")
l = E("l")
d = F("d")
k = D("k")
i = F("i")
j = E("j")

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