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

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

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

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

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

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

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

c.v = k
c.q = b
c.t = h
d.u = f
d.v = e
d.s = e
d.z = b
d.x = h
h.w = e
h.z = c
h.u = d
h.r = d
h.s = b
k.z = e
k.o = n
k.r = m
k.x = g
k.u = h
n.y = k
n.q = m
f.t = h
f.r = h
f.s = e
f.u = n
f.v = n
b.z = d
b.o = n
b.r = m
b.x = c
b.u = h
m.t = h
m.r = h
m.s = d
m.u = n
m.v = n
g.v = k
g.q = k
g.t = h
e.u = f
e.v = d
e.s = d
e.z = k
e.x = h
assert d.u.u.q.r.w.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.q: D = None
        self.t: C = None
        self.txt = txt

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

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

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

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

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

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

c.v = k
c.q = b
c.t = h
d.u = f
d.v = e
d.s = e
d.z = b
d.x = h
h.w = e
h.z = c
h.u = d
h.r = d
h.s = b
k.z = e
k.o = n
k.r = m
k.x = g
k.u = h
n.y = k
n.q = m
f.t = h
f.r = h
f.s = e
f.u = n
f.v = n
b.z = d
b.o = n
b.r = m
b.x = c
b.u = h
m.t = h
m.r = h
m.s = d
m.u = n
m.v = n
g.v = k
g.q = k
g.t = h
e.u = f
e.v = d
e.s = d
e.z = k
e.x = h
assert d.u.u.q.r.w.txt == "e"