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

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

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

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

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

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

n = A("n")
k = B("k")
m = C("m")
c = D("c")
l = E("l")
i = F("i")
g = E("g")
e = A("e")

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

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

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

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

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

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

n = A("n")
k = B("k")
m = C("m")
c = D("c")
l = E("l")
i = F("i")
g = E("g")
e = A("e")

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