class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.x: F = None
        self.z: B = None
        self.v: B = None
        self.y: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: A = None
        self.x: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: A = None
        self.q: C = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: A = None
        self.x: A = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: A = None
        self.q: C = None
        self.w: A = None
        self.v: A = None
        self.txt = txt

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

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