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

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

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

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

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

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

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

n.t = l
n.z = k
n.u = e
n.v = b
c.y = h
c.t = n
c.w = e
f.v = k
f.o = b
f.w = c
e.u = j
e.w = c
e.t = b
m.u = c
m.w = b
m.o = e
h.o = e
b.y = h
b.t = n
b.w = e
k.v = f
k.o = c
k.w = b
j.u = b
j.w = c
j.o = e
l.t = n
l.z = k
l.u = e
l.v = b
assert c.y.o.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.t: A = None
        self.z: C = None
        self.u: D = None
        self.v: B = None
        self.txt = txt

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

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

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

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

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

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

n.t = l
n.z = k
n.u = e
n.v = b
c.y = h
c.t = n
c.w = e
f.v = k
f.o = b
f.w = c
e.u = j
e.w = c
e.t = b
m.u = c
m.w = b
m.o = e
h.o = e
b.y = h
b.t = n
b.w = e
k.v = f
k.o = c
k.w = b
j.u = b
j.w = c
j.o = e
l.t = n
l.z = k
l.u = e
l.v = b
assert c.y.o.u.w.txt == "c"