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

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

d = A("d")
c = B("c")
e = C("e")
b = D("b")
m = E("m")
l = F("l")
g = D("g")
j = F("j")
h = B("h")

d.v = h
d.w = e
d.p = m
c.y = e
c.s = m
c.v = m
c.x = h
e.p = d
b.z = c
b.o = g
b.w = d
m.w = b
m.s = b
m.x = b
m.z = b
m.v = l
l.r = j
l.y = d
l.q = e
g.z = c
g.o = b
g.w = d
j.r = l
j.y = d
j.q = e
h.y = e
h.s = m
h.v = m
h.x = c
assert m.v.y.w.p.v.x.x.s.v.txt == "
class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.w: C = None
        self.p: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.txt = txt

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

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

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

d = A("d")
c = B("c")
e = C("e")
b = D("b")
m = E("m")
l = F("l")
g = D("g")
j = F("j")
h = B("h")

d.v = h
d.w = e
d.p = m
c.y = e
c.s = m
c.v = m
c.x = h
e.p = d
b.z = c
b.o = g
b.w = d
m.w = b
m.s = b
m.x = b
m.z = b
m.v = l
l.r = j
l.y = d
l.q = e
g.z = c
g.o = b
g.w = d
j.r = l
j.y = d
j.q = e
h.y = e
h.s = m
h.v = m
h.x = c
assert m.v.y.w.p.v.x.x.s.v.txt == "l"