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

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

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

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

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

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

c = A("c")
d = B("d")
k = C("k")
i = D("i")
h = E("h")
f = F("f")
g = E("g")
a = F("a")
n = C("n")

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

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

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

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

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

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

c = A("c")
d = B("d")
k = C("k")
i = D("i")
h = E("h")
f = F("f")
g = E("g")
a = F("a")
n = C("n")

c.t = d
c.y = h
c.v = k
c.w = g
c.s = g
d.w = i
d.q = g
d.v = h
d.x = h
k.y = i
k.z = c
k.t = d
i.u = d
h.z = c
h.v = d
h.r = d
h.y = i
h.o = i
h.s = k
f.z = n
f.p = d
f.x = d
f.r = h
g.z = c
g.v = d
g.r = d
g.y = i
g.o = i
g.s = n
a.z = n
a.p = d
a.x = d
a.r = h
n.y = i
n.z = c
n.t = d
assert g.v.x.z.w.v.q.s.txt == "n"