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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: E = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: E = None
        self.s: B = None
        self.z: A = None
        self.txt = txt

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

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

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

c.v = n
c.y = e
c.q = e
c.p = f
c.t = m
c.u = d
f.s = l
f.y = c
f.t = c
l.q = n
l.r = h
l.u = h
l.s = c
l.v = c
e.w = c
e.z = c
e.v = n
e.s = f
n.q = h
h.x = f
h.q = e
h.u = c
h.r = c
h.z = n
d.q = n
d.r = h
d.u = h
d.s = c
d.v = c
m.w = c
m.z = c
m.v = n
m.s = f
assert c.u.v.u.s.t.w.v.txt == "n"