class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: B = None
        self.r: B = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.s: B = None
        self.r: B = None
        self.txt = txt

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

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